Search Results

Search: Posts Made By: Mercfh
Forum: Programming 10-30-2010
7,175
Posted By Mercfh
So do you want me to repost it in the HW section?...
So do you want me to repost it in the HW section? or can it be like "moved"?
Forum: Programming 10-30-2010
7,175
Posted By Mercfh
It's homework, i wasn't aware there was a special...
It's homework, i wasn't aware there was a special forum (srry) but thats also why i wasn't asking for an answer, i was just asking of ways to do things :)
Forum: Programming 10-30-2010
7,175
Posted By Mercfh
unfortunately i have to use shmat <_<. sadly. ...
unfortunately i have to use shmat <_<. sadly.
am I at least "close" to my implementation using shmat?
Forum: Programming 10-29-2010
7,175
Posted By Mercfh
Loading Data in shared memory (C++)
I'll try to keep this short, but basically I need to figure out a way to load data in shared memory (this file will be called load.c) I will later access the data with a print.c program.
The "data"...
Forum: Programming 09-28-2010
7,629
Posted By Mercfh
Oh so it's waiting for them in order? as they...
Oh so it's waiting for them in order? as they come then, instead of just whatever gets done first? sorta...?

either way you've been a HUGE help. and I can say I've honestly learned alot by doing...
Forum: Programming 09-28-2010
7,629
Posted By Mercfh
It seemed to have worked. The terminal is still...
It seemed to have worked. The terminal is still messed up, but im ok with that. I tried the sleep and even when it was off kilter it still made it wait.

So as to improve my learning, cause you...
Forum: Programming 09-28-2010
7,629
Posted By Mercfh
Ya I noticed literally just now with using sleep...
Ya I noticed literally just now with using sleep 60 right after a ls &......
it still let me type it in.

darnit.
so to use waitpid i'd replace wait with waitpid( pid, &status, WNOHANG);
? or...
Forum: Programming 09-28-2010
7,629
Posted By Mercfh
Ah that makes sense. I guess it's not a big deal,...
Ah that makes sense. I guess it's not a big deal, i might go back through and make some changes. I mean.....the way I have it isn't "wrong" is it? it's just I guess......messy (well the terminal is...
Forum: Programming 09-28-2010
7,629
Posted By Mercfh
Sorry, I just had a bunch of ideas was trying to...
Sorry, I just had a bunch of ideas was trying to figure stuff out.
also, i realize that is prints myshell again the first time, but if you try typing in another command, it'll just be a blank cursor...
Forum: Programming 09-28-2010
7,629
Posted By Mercfh
here's an example of what im talking about. ...
here's an example of what im talking about.
myshell> ls -a
. .. a.out fork.c Hello .hi shell shell.c
myshell> ls -l
total 36
-rwxr-xr-x 1 matt matt 8435 2010-09-26 20:43 a.out
-rw-r--r--...
Forum: Programming 09-27-2010
7,629
Posted By Mercfh
That makes sense. Oh well I mean everything...
That makes sense.
Oh well I mean everything else looks correct, the myshell> printout is a little bit screwy when I use & BUT the & seems to be working correctly regardless (using the sleep 60 &...
Forum: Programming 09-27-2010
7,629
Posted By Mercfh
Oh well I guess I just thought there was more to...
Oh well I guess I just thought there was more to background.

#include <sys/wait.h>
#include <sys/types.h>
#include <unistd.h>
#include <string.h>
#include <string>
#include <iostream>...
Forum: Programming 09-27-2010
7,629
Posted By Mercfh
Ya I had heard about the zombie process thing,...
Ya I had heard about the zombie process thing, altho i'll prolly do that in my "prettying" up after im done with it all. Since im also sure using SIGCHLD is probably a decent addition, especially...
Forum: Programming 09-27-2010
7,629
Posted By Mercfh
It's working? however? I mean..the bool return...
It's working? however?
I mean..the bool return is changing correctly when an & is found?
Im not saying it's the best thing to be using....but for a shell such as this (being extremely simple) it's...
Forum: Programming 09-27-2010
7,629
Posted By Mercfh
EDIT WOOT IT WORKS. check dis out #include...
EDIT WOOT IT WORKS.
check dis out

#include <sys/wait.h>
#include <sys/types.h>
#include <unistd.h>
#include <string.h>
#include <string>
#include <iostream>
#include <stdlib.h>

using...
Forum: Programming 09-27-2010
7,629
Posted By Mercfh
Well if I could get that while loop to run id be...
Well if I could get that while loop to run id be able to get the & out....but for some reason i get a seg fault in the commented out section of the code....
Forum: Programming 09-27-2010
7,629
Posted By Mercfh
Oh....well crap. Oh well I mean the parsing...
Oh....well crap.
Oh well I mean the parsing function works....
I checked with some extra debugging to make sure it's parsing and it is, however Im just not so sure how to do a background process,...
Forum: Programming 09-27-2010
7,629
Posted By Mercfh
Unix Shell background processing
So I made my own unix shell, but i want to make a background process when using the & appended to the end, so far most of the commands seem to work (except cd, but thats another story)
right now...
Showing results 1 to 18 of 18

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