Modify the program from Figure 24 to print the device number of /dev/tty beforeand after the child calls setsid(2). Try the program on FreeBSD 8.0 and one other platform. Explain the results

What will be an ideal response?


On Linux 3.2.0, Mac OS X 10.6.8, and Solaris 10, the device number is the same regardless of whether the child process has a controlling terminal. On FreeBSD 8.0, however,the device number changes when the process no longer has acontrolling terminal. This is because FreeBSD 8.0 treats the /dev/tty node almost like a symbolic link in the kernel. When it is accessed (even if it isn’t being opened), the v-node that is returned is the v-node for the real terminal device assigned as the controlling terminal. When a process doesn’t have a controlling terminal, the device number printed is the device number of the pseudo device implementing the/dev/ttyfunctionality

Computer Science & Information Technology

You might also like to view...

Discuss the role of NIST in the FISMA legislation.

What will be an ideal response?

Computer Science & Information Technology

Map your high-level data model to a set of relational tables that represent the entity and relationship types. Identify primary, alternate, and foreign keys.

What will be an ideal response?

Computer Science & Information Technology

In a relational database

A. the user's view of the physical database is the same as the physical database B. users perceive that they are manipulating a single table C. a virtual table exists in the form of rows and columns of a table stored on the disk D. a programming language (COBOL) is used to create a user's view of the database

Computer Science & Information Technology

?The first expression in a FLWOR query structure is the _____ clause.

A. ?for B. ?let C. ?where D. ?return

Computer Science & Information Technology