Hi
I have a related question.
I am actually using popen to run some shell scripts from within an
application. However sometimes these scripts hang and I would like
to be able to kill the script after some amount of time.
Otherwize, when I kill the parent application the script is still
running and therefore the resources (sockets etc..) associated with
the application dont get closed.
Is there some way of sending a kill signal to a processes started
with popen()? pclose is no good as it waits for thhe child to exit.
Thanks
Caius
On 21 Dec 2005, at 12:32, Brian J. Landsberger wrote:
Kevin,
You may be able to use popen for this, Stevens covers this in
sections 14.3 and 14.4 of Advanced Programming in the UNIX
Environment (first revision). I suggest reading through Chapter 14
though.
Thanks,
Brian J. Landsberger
email@hidden
Cell: 206.658.5819
On Dec 21, 2005, at 12:08 PM, Kevin Packard wrote:
Please forgive me if this is not the appropriate list, but I've
not been unable to google the answer, or find it in Apple's dev
pages.
Is there any way to programatically interact with a UNIX tool
from a Carbon app? sysctl() gives me a one-shot run, but I'd
like to launch a tool, create some sort of a pipe to it, write to
its stdin, and read from its stdout.
Can someone please point me to a method to do this (or tell me
I'm insane)?
thanks,
--
Kevin Packard
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Unix-porting mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/unix-porting/brian%
40landsberger.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Unix-porting mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/unix-porting/howcroft%
40hep.phy.cam.ac.uk
This email sent to email@hidden
--
Caius Howcroft
Mobile (UK): +44 779 203 0046
Mobile (US): +1 626 487 1202
Skype: caiush
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Unix-porting mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/unix-porting/ldm%
40thorgal.homelinux.org
This email sent to email@hidden