Skip to contentSkip to conversation

corrected:what is fcntl function

DISCUSSION rinku rathore 2 participants 3 messages Oct 4, 2004

lore
Share & tools
lore
#0 lore raw

Hello,
Actually,I wanted specifically about the following fcntl functions,listed below,here fd is file descriptor

fcntl (fd, F_SETOWN, getpid());

fcntl (fd, F_SETFL,fcntl (fd, F_GETFL, NULL) |
O_ASYNC));

Rinku

__________________________________
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail

#2 lore raw
In reply to Suciu Flavius

hello,

fcntl (fd, F_SETFL, fcntl (fd, F_GETFL, NULL) |
O_ASYNC));

when somebody are reading / writing or delete your file, the operating
system will generate a SIGNAL to your program (default is SIGIO )
basically fcntl handle the file descriptor that means when system generate a Signal SIGIO it is handled by that fd(file descriptor),passed as first argument can I get more information about O_ASYNC

Quoted 46 lines · --- Suciu Flavius

fcntl (fd, F_SETOWN, getpid());

the user of the program will became the owner of the opened file

fcntl (fd, F_SETFL, fcntl (fd, F_GETFL, NULL) |
O_ASYNC));

when somebody are reading / writing or delete your file, the operating
system will generate a SIGNAL to your program (default is SIGIO )

check man 2 fcntl for more detailed explanation.

Quoted 17 lines · rinku rathore

Hello,
Actually,I wanted specifically about the following fcntl functions,listed below,here fd is file descriptor

fcntl (fd, F_SETOWN, getpid());

fcntl (fd, F_SETFL,fcntl (fd, F_GETFL, NULL) |
O_ASYNC));

Rinku

Quoted 6 lines

__________________________________
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail
-
To unsubscribe from this list: send the line

"unsubscribe linux-c-programming" in

Quoted 2 lines

the body of a message to [email protected] More majordomo info at

http://vger.kernel.org/majordomo-info.html

Quoted 1 line
Quoted 7 lines

-
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to [email protected] More majordomo info at
http://vger.kernel.org/majordomo-info.html

_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com

#1 lore raw
In reply to rinku rathore

fcntl (fd, F_SETOWN, getpid());

the user of the program will became the owner of the opened file

fcntl (fd, F_SETFL, fcntl (fd, F_GETFL, NULL) | O_ASYNC));

when somebody are reading / writing or delete your file, the operating system will generate a SIGNAL to your program (default is SIGIO )

check man 2 fcntl for more detailed explanation.

Quoted 26 lines · rinku rathore

Hello,
Actually,I wanted specifically about the following fcntl functions,listed below,here fd is file descriptor

fcntl (fd, F_SETOWN, getpid());

fcntl (fd, F_SETFL,fcntl (fd, F_GETFL, NULL) |
O_ASYNC));

Rinku

__________________________________
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail
-
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html