Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

158
Views
Swift macOS Process.run () pérdida de puerto

Código actual:

 #!/usr/bin/swift import Foundation func runSleepProcess() { let sleepProcess = Process() sleepProcess.executableURL = URL(fileURLWithPath: "/bin/sleep") sleepProcess.arguments = ["0"] try? sleepProcess.run() sleepProcess.waitUntilExit() } while true { runSleepProcess() }

Mirando en el monitor de actividad, parece que el uso del puerto mach aumenta en 1 en cada ciclo. ¿Es este el comportamiento esperado cuando se ejecuta un proceso externo? Si no, ¿cómo soluciono la fuga? Gracias.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

No es el comportamiento esperado y este problema ya se informó. La solución para esto es usar posix_spawn en lugar de Process .

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!