Changeset 6631 for trunk/tools
- Timestamp:
- Sep 4, 2001, 3:29:49 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/CmdQd/CmdQd.c
r6627 r6631 1 /* $Id: CmdQd.c,v 1. 5 2001-09-02 03:33:30bird Exp $1 /* $Id: CmdQd.c,v 1.6 2001-09-04 13:29:49 bird Exp $ 2 2 * 3 3 * Command Queue Daemon / Client. … … 14 14 15 15 /** @design Command Queue Daemon. 16 * 16 17 * This command daemon orginated as tool to exploit SMP and UNI systems better 17 * building large programs, but also when building one specific component of18 * when building large programs, but also when building one specific component of 18 19 * that program. It is gonna work just like the gnu make -j option. 19 20 * … … 37 38 * 38 39 * The communication between the client and the daemon will use shared memory 39 * and an mutex semaphore which directs the conversation. The shared memory 40 * block is allocated by the daemon and will have a quite simple layout: 40 * with an mutex semaphore and two event sems to direct the conversation. The 41 * shared memory block is allocated by the daemon and will have a quite simple 42 * layout: 41 43 * Mutex Semaphore. 42 44 * Message Type. … … 62 64 * Success/failure indicator. 63 65 * 66 * - Dies: 67 * Nothing. This is a message to the client saying that the 68 * daemon is dying or allready dead. 69 * 64 70 * The shared memory block is 64KB. 65 71 * … … 68 74 * 69 75 * The workers is individual threads which waits for a job to be submitted to 70 * execution. Each worker is two threads. The job is executed thru a spawnvpe 71 * call and all stdout is read by the 1st worker thread, stderr is read by the 72 * 2nd thread. (Initially we've merged the two pipes and used one thread.) 73 * The output will be buffered (up to 4 MB). When the job is completed we'll 74 * put the output into either the success queue or the failure queue 75 * depending on the result. 76 * 76 * execution. If the job only contains a single executable program to execute 77 * (no & or &&) it will be executed using DosExecPgm. If it's a multi program 78 * or command job it will be executed by CMD.EXE. 79 * 80 * Output will be read using unamed pipe and buffered. When the job is 81 * completed we'll put the output into either the success queue or the failure 82 * queue depending on the result. 83 * 84 * Note. Process startup needs to be serialized in order to be able to redirect 85 * stdout. We're using a mutex for this. 77 86 * 78 87 */
Note:
See TracChangeset
for help on using the changeset viewer.