Next: Known Bugs, Previous: Gtk GL Extras, Up: Top
app
(define app ...)
for a top-level application
widget or similar. In Guile 1.6.4 app
is used for the implementation
of the module system and a new binding will stop use-modules
working.
primitive-fork
dup
of the X server connection
and doing anything on it will upset the parent's communications, probably
causing a crash.
Or the parent could leave the connection alone and let the child use it. The point is that only one of the two may use it. This is the same as in a C program.
Gtk sets up certain atexit
handlers to shutdown its server connection,
and these mustn't run in the child either. In Guile 1.8.1 and higher
primitive-_exit
(see Processes) can be used to exit without running those handlers. In earlier
versions the suggestion is for a child to exec a do-nothing program when it
wants to exit (either normally or for some exception). Eg. an error exit,
(execl "/bin/false" "/bin/false")
For reference, the current implementation of (ice-9 popen)
is safe,
provided no errors are encountered in the child setups or spawning of
/bin/sh.
(define (list-apply lst proc) (apply proc lst)) (list-apply (gtk-accelerator-parse str) (lambda (key mods) ...))
Or for instance the same with a syntax similar to receive
(see Returning and Accepting Multiple Values),
(define-macro (receive-list vars expr . body) `(apply (lambda ,vars ,@body) ,expr)) (receive-list (key mods) (gtk-accelerator-parse str) ...)