script issue

From: Ashish Nigam (ashishn@ntechra.com)
Date: Thu Jul 25 2002 - 18:46:33 EDT


Hi,
I am yet not able to get hold of this problem..
I had send a followup of my previous mail 3 days back but I still do not see
in the mailing list, subject was "problem with script".
So, I am sending my problem again.
I have a java application.
According to design, it runs for sometime, and then after pre-determined time,
it has call a shell script and then kill itself without waiting for script
execution to complete.That script is called in background mode.
I used a very simle script to test this....

#!/bin/bash
/usr/ucb/printenv

i used this command to execute the script
truss -f -o stoplog /usr/local/test/test &

Now when the script is executed, truss output gave me this reason for the
error

4090: write(2, " + / u s r / u c b / p".., 20) Err#32 EPIPE
4090: Received signal #13, SIGPIPE [default]
4090: *** process killed ***

It seemed that file descriptor is being closed before this process tries to
write onto it.
but which process is closing it.In truss output I don't see mention of any
other process except 4090.

well, then i thought that i redirect the stdout and stderr to a file , so i
called the script using this command
truss -f -o stoplog /usr/local/test/test &>dirlog &

but this time again, I got the same error.

4136: write(2, " + / u s r / u c b / p".., 20) Err#32 EPIPE
4136: Received signal #13, SIGPIPE [default]
4136: *** process killed ***

I checked PATH parameter and it seems to be OK.
I am very confued as to what is happening...
Please anyone, can shed some light on it. any thoughts as to why this can
happen....
I have to work in multiple OS environment. In all other OS , things are
working fine.... it's only in solaris, I have this problem.

Thanks,
Ashish
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:24:39 EDT