> On 5.0.5, I have a ELF 32-bit LSB executable (tin) that seems to not want to
> work unless it is on an active tty.
> If I try to run the program in the background (using &), I get:
> select() failed: Error: Invalid arguement
> Is there a way to "fool" it into thinking it is on an active tty?
> (Ultimately, I want to run this in cron.)
> Thanks in advance,
> Fabio
*maybe* with expect (see skunkware)
maybe with nohup (standard command)
and/or maybe by simply redirecting one or more of fd's 0, 1, and 2.
explanation: maybe when a program goes into the background it just closes 0
(stdin), 1(stdout), and 2 (errout) and so you can't call select() on
nothing. so maybe if you supply someting for select() to act on that will be
good enough. so perhaps just tuoch a couple files progin, progout and run
with prog 0<progin >progout 2>&1
or perhaps use an existing but always unused tty
disable tty06
prog </dev/tty06 >/dev/tty06 2>/dev/tty06
(I just tried this with a simple "more" command and it didn't quite work as
I'd hoped. it displayed the output on tty06, but didn't accept any
keystrokes from tty06 or anywhere else, had to kill -HUP the process. but
something like this might still get you program to run if you don't need to
send it any keystrokes anyways. or you could store the input in a regular
file and do prog <file >/dev/tty06 2>&1
I think linux has a command for running a program on a particular tty
instead of the current one, something like "vcopen" , anyone know of a sco
equivalent?
--
Brian K. White http://www.squonk.net/users/linut
+++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++.
filePro BBx Linux SCO Prosper/FACTS AutoCAD #callahans Satriani