Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
3 votes
1 answer
293 views

Writing a tail command clone

I'm reading Bruce Molay's book on Unix programming, and as an exercise I've implemented a copy of the tail command. My approach goes over the entire file once, to ...
albert's user avatar
  • 133
2 votes
1 answer
102 views

Rsync helper in C (Improved)

Last week I posted a previous version of this code. I improved the program and worked on it for a few days and I would love to get reviews, feedback and tips so I could learn more and more from you ...
yan_kh's user avatar
  • 87
3 votes
1 answer
227 views

UNIX cp multithreaded implementation in C

I recently finished a high school project of mine for a class revolving around creating my own multithreaded implementation of the "cp" terminal command in UNIX systems. I am seeking for ...
user avatar
4 votes
2 answers
502 views

Implementation of portscanner for a host

I have tried to check whether the ports of a host from port 0 to port 1023 is open or not. Could someone please review this code and provide feedback. ...
Paul's user avatar
  • 297
3 votes
1 answer
262 views

Finding the class to which the IP address belongs

I have tried the code for finding the class of the IP address the user inputs, and printing the network and the host bits in the IP address. Could someone please review this approach and provide ...
Paul's user avatar
  • 297
8 votes
4 answers
537 views

Implementation of system() function in Linux using fork() , exec() and waitpid() system calls

I have written the code for implementation of system() function using fork(), exec() and waitpid(). Could someone please review this code and provide feedback. Thanks a lot. ...
Paul's user avatar
  • 297
4 votes
2 answers
86 views

Implementation of cp program that prints the number of bytes copied

I have written the code for implementation of the cp program that prints the number of bytes copied when the user presses Ctrl-C. Could someone please review this code and provide feedback. Thanks a ...
Paul's user avatar
  • 297
2 votes
1 answer
47 views

Reproduce the system() function of linux

My mentor says to reproduce the system() function of Linux exactly as given in the man pages. I have written the below code. Could someone review this code and provide me any suggestions for ...
Paulson Raja L's user avatar
2 votes
1 answer
98 views

The code reads from a specified offset to the specified number of bytes in a file

The code reads the specified number of bytes from a specified offset in a file, I have handled the partial reads and bytes > buf_size conditions. Could anyone review the code? and say whether the ...
Paulson Raja L's user avatar
-2 votes
1 answer
87 views

The code reads the file from the specified offset to the specified number of bytes. How to handle errors of partial reads in reading a file [closed]

I could like to read a file from a specified offset to a certain number of bytes in a file. I would pass the filename, the offset, the number of bytes as an argument. The constraint is should use only ...
Paulson Raja L's user avatar
2 votes
0 answers
210 views

Blocking serial port C library

I am planning to write a reasonably feature rich serial library but wanted to cut my teeth on something fairly basic. This serial library is fairly simple. It is a thin wrapper on the UNIX open, ...
arcomber's user avatar
  • 2,531
2 votes
2 answers
150 views

Set-uid root program that runs a program as the user “restrict” (follow-up)

See Set-uid root program that runs a program as the user "restrict" for context. I've written a very short program that is intended to run the program specified in its arguments (...
Talia Stocks's user avatar
1 vote
1 answer
135 views

Set-uid root program that runs a program as the user "restrict"

I've written a very short program that is intended to run the program specified in its arguments (argv) as the user named "restrict" (which exists). I want to make ...
Talia Stocks's user avatar