Re: g_spawn_asnyc -- What is wrong ?

harringf wrote:
Hello all,

I am trying to use g_spawn_async, but so far I am not getting the results I

 In the program below: 
 1) The output from the func() is never displayed.
 2) The file hello.txt is never removed.
 3) I get the child's pid correctly (i.e, not 0 or -1)
 4) The program does not report errors.

  I am sure I am doing something really wrong -- where ?

 Note: I am trying to do this so that I can delete a directory recursively in
windoze and Linux, so I am trying to stay platform independent by using this -
Any better alternatives ?

  Thanks in advance.

rm Requires You To Respond To a Yes/No Question "rm: remove `FILENAME`?
And I Didn't See In Your Program Your Answer To That Question.
You Can Use
char* cmd[] = { "rm", "-f", "hello.txt", NULL };
To -force The Removal Of The File(s).
Also You Don't Want To Put Quotes Around The NULL In The cmd Array.

The Func() Problem I'm Not Sure About But Fixing Those Things Might Fix That
One Too.

I Hope This Helps You.

Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More

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