| 1 | Index: unix-sockets |
|---|
| 2 | =================================================================== |
|---|
| 3 | --- unix-sockets (revision 25894) |
|---|
| 4 | +++ unix-sockets (working copy) |
|---|
| 5 | @@ -60,12 +60,20 @@ |
|---|
| 6 | |
|---|
| 7 | Returns the pathname of the socket associated with the given listener object. |
|---|
| 8 | |
|---|
| 9 | +<procedure>(unix-pair)</procedure> |
|---|
| 10 | + |
|---|
| 11 | +Create a pair of connected sockets and returns four values: an input- |
|---|
| 12 | +and output-port for the first socket, and the same for the second |
|---|
| 13 | +socket. These ports can be used for bidirectional communication |
|---|
| 14 | +between a parent and child process, for example. |
|---|
| 15 | + |
|---|
| 16 | === Gotchas |
|---|
| 17 | |
|---|
| 18 | If you try to write to the socket's output port when the other side has shut down the socket, a SIGPIPE will be generated. The application must handle or ignore the signal (see [[posix]]); once the signal is dealt with, the write attempt will raise an exception of its own using {{signal}} from [[Exceptions]]. |
|---|
| 19 | |
|---|
| 20 | === Changelog |
|---|
| 21 | |
|---|
| 22 | +* 1.7 Add {{unix-pair}} |
|---|
| 23 | * 1.4 Do not import errno, to make it compatible with Chicken 4.1.0 |
|---|
| 24 | * 1.3 Applied bugfix by Shawn Wagner |
|---|
| 25 | * 1.2 Added include for sys/time.h, which is needed on some systems [Thanks to Kon Lovett] |
|---|