Search Results

Search: Posts Made By: tejbuch
Forum: Programming 11-12-2006
15,579
Posted By tejbuch
hey thanks a lot jim.
hey thanks a lot jim.
Forum: Programming 11-12-2006
15,579
Posted By tejbuch
nice command and nice() system call
Hi I want to implement the nice command in the shell that I am building. I came to know that there is a corresponding nice() system call for the same. But since I will be forking different processes...
Forum: Programming 09-28-2006
14,739
Posted By tejbuch
sem_open() should ideally return the address of...
sem_open() should ideally return the address of the semaphore whereas in this case it is returning 0 ..What can be the probable reasons for the open() call not working?
Forum: Programming 09-28-2006
14,739
Posted By tejbuch
Since it is returning a zero, I think sem_open()...
Since it is returning a zero, I think sem_open() seems to be working fine. But then after that 'segmentation fault' occurs. Notice that this fault doesn't occur if I comment out the sem_getvalue()...
Forum: Programming 09-28-2006
14,739
Posted By tejbuch
I realised that you had asked for the return...
I realised that you had asked for the return value of sem_open().Please read my next post after that in which I have mentioned that I got the return value as zero. I also got the return value as zero...
Forum: Programming 09-28-2006
14,739
Posted By tejbuch
I also put in the check if(sem_des ==...
I also put in the check

if(sem_des == (void*)-1){
perror("sem_open failure");
printf("ERROR\n");
exit(1);
}

after sem_open() and printed
printf("%d\n",(int*)sem_des);

which...
Forum: Programming 09-28-2006
14,739
Posted By tejbuch
hi I even tried out using ...
hi I even tried out using

x=sem_getvalue(sem_des,value);

and tried printing the value of x
but the execution does not reach there..It gives a segmentation fault immediately after the sem_open...
Forum: Programming 09-28-2006
14,739
Posted By tejbuch
Semaphore Segmentation Fault
When I execute the first 4 lines of code , it works fine. But the output gives a segmentation fault on executing the sem_getvalue() function. I looke up everywhere for the syntax and other mistakes...
Showing results 1 to 8 of 8

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