Search Results

Search: Posts Made By: AirBronto
Forum: Programming 11-08-2007
8,583
Posted By AirBronto
Yes my good man. But if you look at the drawing...
Yes my good man. But if you look at the drawing and think about it the output of the command that is going to run will need to be written to the input of next command. So making the output write to...
Forum: Programming 11-07-2007
8,583
Posted By AirBronto
Ok yes i see. I had a different idea of what dup...
Ok yes i see. I had a different idea of what dup did, i have only been doing this Unix stuff for about a week. But in reallity it wont really change my program to close those because they will just...
Forum: Programming 11-07-2007
8,583
Posted By AirBronto
See when i do something like this: tmpin =...
See when i do something like this:
tmpin = dup(0);
I am just saving the fact that my parent process's 0th file descriptor was pointing to stdin in tmpin.

By the time my program gets to fork(),...
Forum: Programming 11-06-2007
8,583
Posted By AirBronto
At the point when fork is called, the parent...
At the point when fork is called, the parent process is not pointing to the standard input and output, tmpin and tmpout. So wouldnt the child not have anything pointing to those after fork?
Forum: Programming 11-05-2007
8,583
Posted By AirBronto
This is how i see my code working with the file...
This is how i see my code working with the file descriptors and pipes and well every thing. Take a look at the picture to see what i am talking about, it is very descriptive and took a long time to...
Forum: Programming 11-04-2007
8,583
Posted By AirBronto
Shell Implementation not working correctly
//save in/out
int tmpin = dup(0);
int tmpout = dup(1);

//set initial input
int fdin;
if(_inputFile)
{
fdin = open(_inputFile, O_RDONLY | O_CREAT, S_IREAD | S_IWRITE);
}
else...
Showing results 1 to 6 of 6

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