Consider the following invocation of the fstatcheck program, from Problem 10.8:
linux> fstatcheck 3 < foo.txt
You might expect that this invocation of fstatcheck would fetch and display metadata for file foo.txt. However, when we run it on our system, it fails with a "bad file descriptor." Given this behavior, fill in the pseudocode that the·shell must·be executing between the fork and execve calls:
if (Fork() == 0) { /* child */
/* What code is the shell executing right here? */
Execve(“fstatcheck”, argv, envp);
}
Trending nowThis is a popular solution!
Learn your wayIncludes step-by-step video
Chapter 10 Solutions
EBK COMPUTER SYSTEMS
Additional Engineering Textbook Solutions
C How to Program (8th Edition)
Starting Out with Java: From Control Structures through Objects (7th Edition) (What's New in Computer Science)
C Programming Language
Web Development and Design Foundations with HTML5 (9th Edition) (What's New in Computer Science)
C++ How to Program (10th Edition)
- Computer Networking: A Top-Down Approach (7th Edi...Computer EngineeringISBN:9780133594140Author:James Kurose, Keith RossPublisher:PEARSONComputer Organization and Design MIPS Edition, Fi...Computer EngineeringISBN:9780124077263Author:David A. Patterson, John L. HennessyPublisher:Elsevier ScienceNetwork+ Guide to Networks (MindTap Course List)Computer EngineeringISBN:9781337569330Author:Jill West, Tamara Dean, Jean AndrewsPublisher:Cengage Learning
- Concepts of Database ManagementComputer EngineeringISBN:9781337093422Author:Joy L. Starks, Philip J. Pratt, Mary Z. LastPublisher:Cengage LearningPrelude to ProgrammingComputer EngineeringISBN:9780133750423Author:VENIT, StewartPublisher:Pearson EducationSc Business Data Communications and Networking, T...Computer EngineeringISBN:9781119368830Author:FITZGERALDPublisher:WILEY