Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #import <pthread.h>
- #import <stdlib.h>
- #include <unistd.h>
- extern "C"
- {
- char *tfname;
- void *system_async(void *arg)
- {
- system(tfname);
- return NULL;
- }
- double ExecuteShell(char *fname,double wait)
- {
- pthread_t tID;
- tfname = fname;
- if (wait>=1)
- {
- system(fname);
- }
- else
- {
- pthread_create(&tID,NULL,&system_async,NULL);
- usleep(5000);
- }
- return 0;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement