in reply to Strange system call failure in OS X

For debugging, have you tried hardcoding a valuee instead of using $name? If you think a delay is necessary, look at sleep.
  • Comment on Re: Strange system call failure in OS X