Trying to understand signals and restartable system calls

2004-03-19 Thread Mark Alldritt
Hello, I'm trying to understand how signals and restartable system calls interact. Take this example: #!/usr/bin/perl $SIG{USR2} = sub { print Here I Am\n; }; print Starting...\n; my $abc; while (read STDIN, $abc, 20) { print $abc\n; } print Done\n; If I run this script and then send a

Re: Trying to understand signals and restartable system calls

2004-03-19 Thread Ken Williams
On Mar 19, 2004, at 11:34 AM, Mark Alldritt wrote: Hello, I'm trying to understand how signals and restartable system calls interact. Take this example: #!/usr/bin/perl $SIG{USR2} = sub { print Here I Am\n; }; print Starting...\n; my $abc; while (read STDIN, $abc, 20) { print $abc\n; }

Re: Trying to understand signals and restartable system calls

2004-03-19 Thread drieux
On Mar 19, 2004, at 9:34 AM, Mark Alldritt wrote: Hello, I'm trying to understand how signals and restartable system calls interact. Take this example: #!/usr/bin/perl $SIG{USR2} = sub { print Here I Am\n; }; print Starting...\n; my $abc; while (read STDIN, $abc, 20) { print $abc\n; }

Re: Trying to understand signals and restartable system calls

2004-03-19 Thread Joel
Hi folks, I'll toss in my two cents here, since I've done something like this before in a production-type environment. IMHO, The best thing to do would be to have your signal handler set a flag (in the manner described by drieux) and have your loop react to that flag when it changes. This is a

psync Panther and sym links

2004-03-19 Thread Bill Metzinger
I can't find any references to my particular problem. I guess I'm special. I hope someone can shed a little light. I've used psync for years on OSX. I call it from a shell script during my daily cron. Everything worked great until Panther. When psync runs it copies symbolic links like normal.