Search Results

Search: Posts Made By: ddx08
Forum: Programming 04-05-2007
4,795
Posted By ddx08
i used this link's instr but i still cant get it...
i used this link's instr but i still cant get it to work.

http://www.ecst.csuchico.edu/~beej/guide/ipc/shmem.html
Forum: Programming 04-05-2007
4,795
Posted By ddx08
i only check pid1 equal zero because i want to...
i only check pid1 equal zero because i want to tell the difference between the parent and the child.

and i don't understand the IPC_CREAT flag. i know how to use them with semaphores but not...
Forum: Programming 04-05-2007
4,795
Posted By ddx08
help with shared memory
what i want to do is have an int that can been written into by 2 processes but my code doesn't seem to work.


#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/sem.h>
#include...
Forum: Programming 04-03-2007
18,237
Posted By ddx08
what i did was just define a number of KEYs equal...
what i did was just define a number of KEYs equal to the number of semaphores i wanted and then i created 2 struct to create the functions up and down. i didn't use a void main, just main. Why would...
Forum: Programming 04-03-2007
18,237
Posted By ddx08
sorry, forgot to update this. i found out that i...
sorry, forgot to update this. i found out that i needed to create a stuct that would implement the function i wanted. increment the semaphore by 1 or decrease it by 1.

here is where i got the idea...
Forum: Programming 04-02-2007
18,237
Posted By ddx08
semaphores using up and down
been searching around on how to use an up and down function with semaphores but i can't find an example. i looked into using: "semop" but i have no idea how to use it. I have been able to declared...
Forum: Programming 03-21-2007
7,015
Posted By ddx08
omg it works... !!!! wow thanks. all i want was...
omg it works... !!!! wow thanks. all i want was for 2 processes to read from the same file one line at a time
Forum: Programming 03-20-2007
7,015
Posted By ddx08
this is what i have now still no idea why is...
this is what i have now still no idea why is doesn't work


#include <stdio.h>
#include <fcntl.h>
main( )
{
FILE *fileptr;
char temp1[100];
char buff2[20];
int pid2;
FILE * fileptr1;...
Forum: Programming 03-19-2007
7,015
Posted By ddx08
i really can't use read do to the fact that i...
i really can't use read do to the fact that i want it to read a whole line and all the lines aren't the same length. i got it to work using read but it didn't complete my objective to read line by...
Forum: Programming 03-18-2007
7,015
Posted By ddx08
read from file using forks
i'm tring to make 2 processes each read from the same file but only one of them read the file.


FILE * fileptr1;
fileptr1 = fopen("file1.txt","rt");
pid2=fork();
while(1)
{...
Forum: Programming 02-15-2007
3,882
Posted By ddx08
fork() problem
i'm just trying to make 2 process read from the same 1 line a time. For some reason only the child reads.


#include<stdio.h>
#include <sys/types.h>
void getlinefromfilep(void);
void...
Showing results 1 to 11 of 11

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