site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:from:to:in-reply-to:content-type:content-transfer-encoding:mime-version:subject:date:references:x-mailer; bh=ylJ9NA+csxGTsKvrZj6YvF4icB1vjIx17vYUuVEwLJQ=; b=hUFhmgp2Cy6O+iPEX+R9JFmHwkUu7ViTLcx+LOAOQW7Gbf8rdITJF6myfhhl8k912Fs/IZlNLYpEP92sgvOaZkwdoiAJY+DEtUFfw5AZJ47EVCh3ikZJBAe4YU8gs9opvLW6AsoUHQvZRG44p78mAULYQgzWNoZsDvWpKqC6g58= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:from:to:in-reply-to:content-type:content-transfer-encoding:mime-version:subject:date:references:x-mailer; b=rzfXchb05otOOkT8IygIQbER+KK9noTkUXcPBE9FGTgbdAtEmBTFnpaJYilH+NQpcn64WdoXxAEaAVCGhPCSt7lcgJwuplPZLyyB7G3Bueg/AgKt4WTVAX7jki1RdY3m9vnl2wMfnubid7kdSMcfeg/3tM6HYPI5rlpxDcO99SQ= Hello people, * (SIGRTMIN + x) signals as callback functions for fcntl() Any advise is welcome. Regards, Thierry _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... I'm writting a little program in C for educational and personal use in which I need to read from 2 descriptors piped from the stdout and stderr of an other forked process. I already figured out how to do all the pipings and the descriptors closing in both father and son processes. Also I have already done the reading of ready descriptors returned by select(). But now I'd like to do the same with fcntl() so that the process is not blocked on select() and can do anything else when the descriptors are not ready to be read. I have read some documentation about fcntl and some linux examples, so I tried to adapt them to Darwin (on OSX 10.5) and could not compile because of some errors. The example uses: Is it possible to set a different (other than SIGIO or SIGURG) signal for fcntl callbacks ? If yes, I have not found in the fcntl man page any reference to the F_SETSIG function ... Does Darwin allow you to have SIGRTMIN, SIGRTMAX ? I have not seen it in the output of /bin/kill -l. Forgive my ignorance but is it possible to send a non existant signal like (SIGUSR2 + x) ? The reason why they use SIGRTMIN + x in the linux example is that they use the possibility to get some si_fd extra member in the siginfo_t struct passed as argument to the signal handler installed with sigaction(). And so it is possible to know which descriptor became ready when the signal was sent (no need to use select() in the signal handler) I have not found this si_fd member in the Darwin siginfo_t structure. So how can I proceed ? I know I could use the default signals SIGIO/ SIGURG and use a select() in the signal handler to check which descriptor are available for reading now. This email sent to site_archiver@lists.apple.com