POSIX signals sent to child processes are blocked under app sandbox
| Originator: | SelfTransformingElfMachine | ||
| Number: | rdar://10031387 | Date Originated: | 8/26/11 |
| Status: | Duplicate | Resolved: | Open |
| Product: | MacOS X | Product Version: | 10.7.x |
| Classification: | UI/Usability | Reproducible: | Always |
Summary: Our app uses NSTask to create ssh tunnels for port forwarding. When the app is quit we send [task terminate] and will kill() the process if the task does not terminate quickly. The -terminate method does not terminate the task and ssh is still running after it returns. The kill() function says that the signal has been blocked in Console.app. Steps to Reproduce: Create and launch a new ssh task with NSTask. Call -terminate on the process, see that is is still running. Call the function kill(pid, SIGKILL) on the pid of the process and see in the console that is has been blocked. Expected Results: Apparently this should be working according to: https://devforums.apple.com/message/519985#519985 Actual Results: -[NSTask terminate] does not terminate the NSTask. kill(pid, SIGKILL) also does not kill the NSTask because it is blocked by the sandbox. Regression: Works find outside of the sandbox. Notes: -[NSTask interrupt] also does not stop the running task.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!