Search Results

Search: Posts Made By: Mercfh
Forum: Programming 09-28-2010
7,818
Posted By Corona688
You may be fighting buffers because you're using...
You may be fighting buffers because you're using printf(). This keeps it in memory until it decides it's convenient to print it(usually, whenever it finds a newline). And when you fork(), you get a...
Forum: Programming 09-27-2010
7,818
Posted By Corona688
Seems quite on-topic to me. cd is special...
Seems quite on-topic to me.

cd is special because it's not a command you run, it's the system call chdir(), and it has to be done inside the shell itself, not in a forked copy. Remember that the...
Forum: Programming 09-27-2010
7,818
Posted By Corona688
Try running a 'sleep 60 &' then a 'ls'. If it...
Try running a 'sleep 60 &' then a 'ls'. If it works, it won't wait a full minute for the sleep to finish before running ls. Nope. You've already created a child with fork(). Fork clones a process,...
Forum: Programming 09-27-2010
7,818
Posted By Corona688
...I keep forgetting the strtok. Yes, it would....
...I keep forgetting the strtok. Yes, it would. That's simple enough. To run things without waiting for them, don't wait for them.void Execute(int background, char* cmd[])
{
pid_t pid;
...
Forum: Programming 09-27-2010
7,818
Posted By Corona688
Please read my reply to you. "strcmp" doesn't do...
Please read my reply to you. "strcmp" doesn't do what you think it does.
Showing results 1 to 5 of 5

 
All times are GMT -4. The time now is 06:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy