[comp.unix.questions] Using popen from a daemon

todd@narnia.ecs.rpi.edu (R. Lindsay Todd) (06/28/90)

I have a program that uses popen and pclose.  If the program has a controlling
tty, the commands started by popen work correctly.  However, if there is no
controlling tty, it seems like popen never even starts /bin/sh.  Oh yes, this
is true under both Ultrix 3.1 and SunOS 4.0.3, the only systems I've been
able to try this with.

There is nothing in the man pages I have that indicate that popen must have
a controlling tty.  Is this some unwritten standard "feature" of popen, or
is it a buggy implementation?
--
R. Lindsay Todd, Systems Programmer
ECS, Rensselaer Polytechnic Institute, Troy, NY 12180-3590
Internet: todd@narnia.ecs.rpi.edu

gwyn@smoke.BRL.MIL (Doug Gwyn) (06/28/90)

In article <YQJ$'7_@rpi.edu> todd@narnia.ecs.rpi.edu (R. Lindsay Todd) writes:
>There is nothing in the man pages I have that indicate that popen must have
>a controlling tty.  Is this some unwritten standard "feature" of popen, or
>is it a buggy implementation?

Maybe it's a bug in the application?
popen() does not require a controlling tty; neither should the shell
that it invokes.  Unless somebody has been mucking around with the
system software, something else must be going on.