Category : Files from Magazines
Archive   : PROGJRNL.ZIP
Filename : LISTING.6

 
Output of file : LISTING.6 contained in archive : PROGJRNL.ZIP


---- Running the named pipe program in Unix -----


% mknod FrankPIPE p # This makes the named pipe in Unix
# I'm just using the arbitrary filename 'FrankPIPE'

% ls -l # Note the 'p' for (named) pipe for FrankPIPE
total 92
prw-rw-rw- 1 frank 1000 0 Aug 27 14:39 FrankPIPE
-rwxrwxrwx 1 frank 1000 16836 Aug 27 14:34 client*
-rw-rw-rw- 1 frank 1000 912 Aug 27 14:34 client.c
-rwxrwxrwx 1 frank 1000 15828 Aug 27 14:36 daemon*
-rw-rw-rw- 1 frank 1000 549 Aug 27 14:36 daemon.c
-rw-rw-rw- 1 frank 1000 110 Aug 27 14:24 local.h

% daemon > logfile &
284 <-------------------- The shell prints the pid of the daemon process

% client & client & client &
285 <-------------------- The shell prints pids of the 3 client processes
286
287

% sleep 10; cat logfile
PID: 286 - string: [Message from a Client]
PID: 285 - string: [Message from a Client]
PID: 287 - string: [Message from a Client]
PID: 286 - string: [Message from a Client]
PID: 287 - string: [Message from a Client]
PID: 286 - string: [Message from a Client]
PID: 286 - string: [Message from a Client]
PID: 287 - string: [Message from a Client]
PID: 285 - string: [Message from a Client]
PID: 286 - string: [Message from a Client]
PID: 285 - string: [Message from a Client]
PID: 285 - string: [Message from a Client]
PID: 286 - string: [Message from a Client]
PID: 286 - string: [Message from a Client]
PID: 286 - string: [Message from a Client]
PID: 285 - string: [Message from a Client]
PID: 287 - string: [Message from a Client]
PID: 287 - string: [Message from a Client]
PID: 286 - string: [Message from a Client]
Byebye from Daemon <------- I sent a SIGINT signal to a client


  3 Responses to “Category : Files from Magazines
Archive   : PROGJRNL.ZIP
Filename : LISTING.6

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/