QNX RTOS v4 Knowledge Base
QNX RTOS v4 Knowledge Base
Title |
Is the system() function non-blocking? |
Ref. No. |
QNX.000002936 |
Category(ies) |
Development |
Issue |
Is the system() function non-blocking?
|
Solution |
Here is a small program to test it and it appears that it is blocking:
#include <stdio.h> #include <stdlib.h>
void main() { printf("start n"); system("sleep 5"); printf("end n"); }
Remember also, that in order to return the exit status of the command, it must wait to get the status. |
|