I have a CProgramA that need to call CProgramB just before CProgramA terminates. How can this be achieved?
jobs
0
Junior Poster in Training
Recommended Answers
Jump to PostYou don't check that execl() doesn't return. If it does, there has been an error, and there is NO exec'ed process.
You don't check that wait() doesn't return an error. If it does, your code will loop forever.
"This ain't like dusting crops boy", you need to check …
Jump to Post> gunzip bar.gz
Your file seems to lack read permissions.
Since it needs to read the file, and it doesn't have read permissions, it's going to fail.There are some very strange permissions on those files. Have you been messing with the umask() function?
Jump to PostIt's going to be a good few days before I can get back to a Linux box to try this out :(
Jump to Post> Then fork another process to change zip file permission.
Or just use the chmod() API call instead of running the chmod command.
Jump to Post> (pid_t)-1, what does this do? Type cast the -1 to pid_t?
Yes, just on the off-chance that pid_t isn't the same as an int.> Can I run fork in a function other than main?
Sure you can. The examples just make it simple.
Actually, I can't think …
All 30 Replies
Salem
5,138
Posting Sage
dubeyprateek
26
Junior Poster
Narue
5,707
Bad Cop
Team Colleague
dubeyprateek
26
Junior Poster
Narue
5,707
Bad Cop
Team Colleague
dubeyprateek
26
Junior Poster
jobs
0
Junior Poster in Training
Salem
5,138
Posting Sage
jobs
0
Junior Poster in Training
Salem
5,138
Posting Sage
jobs
0
Junior Poster in Training
Salem
5,138
Posting Sage
jobs
0
Junior Poster in Training
jobs
0
Junior Poster in Training
Salem
5,138
Posting Sage
jobs
0
Junior Poster in Training
Salem
5,138
Posting Sage
jobs
0
Junior Poster in Training
Salem
5,138
Posting Sage
jobs
0
Junior Poster in Training
Salem
5,138
Posting Sage
jobs
0
Junior Poster in Training
Salem
5,138
Posting Sage
jobs
0
Junior Poster in Training
Salem
5,138
Posting Sage
jobs
0
Junior Poster in Training
Salem
5,138
Posting Sage
jobs
commented:
jobs: thanks for the help.
+1
jobs
0
Junior Poster in Training
jobs
0
Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.