On Thu, 6 Oct 2005, Joel VanderWerf wrote:

>
> I have several ruby processes that are started from a shell script like
> this:
>
> a&
> b&
> c&
> z
>
> I would like only z to respond to SIGINT and be able to interact with
> the tty. But this knowledge cannot be hardcoded into the processes
> themselves.
>
> How can z detect, at run time, that it is the session leader (is that
> the right term?) for this group of processes?

in this case wouldn't

   STDIN.tty?

be enought?  all the background processes will return 'false' for this test i
think.

-a
-- 
===============================================================================
| email :: ara [dot] t [dot] howard [at] noaa [dot] gov
| phone :: 303.497.6469
| Your life dwells amoung the causes of death
| Like a lamp standing in a strong breeze.  --Nagarjuna
===============================================================================