linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Suciu Flavius <suciuflavius@tiscali.de>
To: linux-c-programming@vger.kernel.org
Subject: Re: corrected:what is fcntl function
Date: Mon, 04 Oct 2004 13:06:11 -0700	[thread overview]
Message-ID: <cjra7o$4qb$1@sea.gmane.org> (raw)
In-Reply-To: <20041004083839.61843.qmail@web53008.mail.yahoo.com>

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.


rinku rathore wrote:
> 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 majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


  reply	other threads:[~2004-10-04 20:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-04  8:38 corrected:what is fcntl function rinku rathore
2004-10-04 20:06 ` Suciu Flavius [this message]
2004-10-04 11:33   ` rinku rathore
  -- strict thread matches above, loose matches on Subject: below --
2004-10-04  8:37 rinku rathore

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='cjra7o$4qb$1@sea.gmane.org' \
    --to=suciuflavius@tiscali.de \
    --cc=linux-c-programming@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).