On Mon, Jun 21, 2004 at 10:10:02PM -0400, Ian Langworth wrote:

fork() returns the child process id in the parent and 0 in the child,
so 

> fork and do {

This block executes in the parent process.

> };

The remaining code executes in the child, which will have no lock after the
fork on systems like Solaris where Perl implements the lock using fcntl.
I think you want fork or do.

> sleep 1;
> print ONE "line 2\n";
> print ONE "line 3\n";
> flock ONE, LOCK_UN;
> close ONE;

-- 
Jason
_______________________________________________
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to