Mac Daemons in Perl | 3
Mac Daemons in Perl
Matthias Neeracher is busily re-writing MacPerl to take advantage of GUSI2. GUSI is Matthias' Generic Universal Socket Interface, essentially a network socket and POSIX library for the Mac. GUSI2 adds pthreads, and a host of other features which will allow Matthias to finally bring MacPerl into sync with the standard distribution. No word on how far he is from completion. Eventually, the Mac in MacPerl will devolve into an extended set of modules for the Mac Toolbox and Graphics APIs which will run directly over the standard Perl. The above code will likely survive that change, but it will then be possible to write a normal daemon process on the Mac.
About the Author
Brian McNett is Webmaster of Mycoinfo, the world's first mycology e-journal. He's also a regular contributor to Mother of Perl where he keeps things Mac friendly. Please send comments, praises, and sizable cash contributions to email@example.com
The full source code to the MacPerl daemon is available at: http://www.motherofperl.com/tutorial/10/macdaemon.pl