[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: system() bug



Hi

On Mon, 16 Jul 2001, dgi_il@surfree.net.il wrote:

> I am using a piece of software called irexec() which comes with lirc (remote
> control), and I wanted that when I press a button on my remote control it
> will oopne xawtv and when I press it again it will close it (the power
> button).
>
> I wrote a script, which does work under pure bash, but when executed in
> irexec, it does not work - it does not redirect some output to to a tmp file
> which is needed to kill/close that wanted program. The funny part comes when
> I change the system() line in irexec to some exec("/usr/bash") line. it
> redirects the output very good (but then it closes the irexec program...).
> the bash i have is 2.04  from mandrake 7.2.

It seems that the first line of the script is:

#/bin/sh!

instead of:

#!/bin/sh

Therefore this is not an executable script. Running it through bash will
still work.

-- 
Tzafrir Cohen
mailto:tzafrir@technion.ac.il
http://www.technion.ac.il/~tzafrir



=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il