[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] Spawn process from a thread (ie in awful)

From: Thomas Hintz
Subject: [Chicken-users] Spawn process from a thread (ie in awful)
Date: Mon, 22 Oct 2012 22:15:36 -0700


I don't seem to be able to spawn a child process from a thread and have the process continue executing after the parent process terminates. This happens if the thread that spawns the child process is still running when the parent process is terminated.

I am attempting to start processes from within awful pages.

If I run the following program and terminate it, (ctrl-c) before the sleep completes, the child process does not continue running. If I let it complete without interruption, the child process keeps running, even after the parent process has exited. I also tried (process-fork cmd), (process-wait (process-run cmd)), and using the shell egg. Nothing seems to work. Maybe it isn't supposed to work? Regardless, I would just like to be able to spawn a process in awful, from hitting a web page, and have the process keep running. (This is for an internal tool.) Any help would be appreciated.

-Thomas Hintz

(use posix srfi-18)

(define t
   (lambda ()
     (process-run "csi -s i-want-to-keep-running.scm")
     (sleep 10))))

(thread-start! t)
(thread-join! t)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]