Ha, ok, so it should be "pid $pipe" not [pid $pipe] and it works now but it still returns the PID even if the stream is closed, so does anyone know a working method please?
I'm trying to test for the java prog exiting unexpetidly cause what happens is, the java prog dies then @ the next call to gets it's probably reading -1 or something and it hangs, cpu hits 100% and has to be killed. Is the only way round this to build my own gets proc and reload the java prog when im gettin -1 or whatever (EOF didn't work cause pipe was alive @ last call to gets).
So the java program exits, it doesn't hang? Then what is using 100% cpu, eggdrop? That means you're doing something wrong, such as...
1. you have a loop with gets, but are using nonblocking mode
2. you have a loop with gets, in blocking mode, but aren't checking for eof
3. you have fconfigured events with nonblocking mode, but never close the pipe
That's to start with anyway. It's really impossible to say without you posting at least some of your code. Also, try adding debugging info (to eggdrop, and your java program).