fd_init()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In fd_init() in filesys.c the namelist file is opened and pc->nfd is initialized:

 

                                if ((pc->nfd = open(pc->namelist, O_RDONLY)) < 0)

                                                error(FATAL, "%s: %s\n", pc->namelist, strerror(errno));

                                else {

                                                close(pc->nfd);

                                                pc->nfd = -1;

                                }

 

 

In the event of a successful open the else clause is executed, and the file that was just opened is closed. Why?

 

 

 

James T. Bradshaw

Firmware Engineer

Enterasys Networks

50 Minuteman Rd.

Andover, MA 01810

USA

Tel. (978) 684-1544

 

--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/crash-utility

[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux