in reply to named pipe and "Text file busy"

if it's a named pipe and it has been created read-only, the "file" still exists after you've interrupted your program. however, Ctrl-C means $SIG{INT} for the process, so by installing a routine which hooks on this signal you should easily remove the pipe prior to exiting the process.
--------------------------------
masses are the opiate for religion.

Replies are listed 'Best First'.
Re^2: named pipe and "Text file busy"
by finpro (Novice) on Nov 25, 2007 at 04:52 UTC
    Thanks for this, but that's what i've got atm. I've installed my routine for $SIG(INT) and inside i close the pipe explicitly, however, this does not help and the behaviour is the same: after the script terminates, doing echo "message" > pipename or trying to write with any other program results in "Text file busy". Under normal circumstances a writing program should just block (unless the pipe is open in non-blocking mode), given that there are no readers (the script has been terminated). Any ideas? Thanks.