CDRW problems and more ... <-- asxeto

Giorgos Keramidas keramida at ceid.upatras.gr
Tue Mar 12 02:04:01 EET 2002


On 2002-03-11 16:38, V13 wrote:
> On Sunday 10 March 2002 09:15, Christos Ricudis wrote:
> > Tom Diamond wrote:
> > > Επίσης (άσχετο) :
> > > Μπορεί μια εφαρμογή να κλωνοποιήσει τον εαυτό της στο παρασκήνιο
> > > και να σκοτώσει τον εαυτό της στο προσκήνιο; Δηλαδή, όπως και να την
> > > ξεκινήσει ο χρήστης αυτή να καταλήξει να παίζει στο παρασκήνιο;
> >
> > Nai, kai malista ayto einai psilostandard stous daemons. Enas daemon me to
> Toso standard poy yparxei toylaxiston ena OS (irix), to opoio to exei kai san 
> etoimi synartisi (daemonize)
> 
> > * Kanei disassociate itself apo to controlling tty
> > * Kati kanei me to process group toy alla de 8ymamai ti :>
> 
> Bazei ton eayto toy san session leader (kai epomenos kai group leader) se ena 
> neo session (kai group), oste na ksekopsei entelos apo to tty kai ta ypoloipa 
> processes toy palioy group.
> 
> > * Kleinei ola ta open file descriptors
> 
>  Ksereis (h kanenas allos) an yparxei periptosi ena close se fd to opoio den 
> einai open h den einai valid (px -1) na dimioyrgisei problima sto programma ?

Apo to kernel tou FreeBSD, ekei pou sto kern_descrip.c orizetai h close()
syscall, exei kapou kai to ejhs:

        if ((unsigned)fd >= fdp->fd_nfiles ||
            (fp = fdp->fd_ofiles[fd]) == NULL) {
                FILEDESC_UNLOCK(fdp);
                error = EBADF;
                goto done2;
        }

Se ellinika.  An to file descriptor einai polu megalo gia na exei nohma, h
einai hdh closed, errno = EBADF (bad file descriptor), return -1;

Giorgos Keramidas                       FreeBSD Documentation Project
keramida@{freebsd.org,ceid.upatras.gr}  http://www.FreeBSD.org/docproj/



More information about the Linux-greek-users mailing list