| sub-categories and articles |
|
| |
|
common |
common includes for compiling samples in subdirs here like threads
|
critical_section |
add
|
errors |
add
|
exec |
add
|
filedes |
file descriptors and their manipulation under unix
|
fork |
fork and wait
|
ipc |
shared memory, semaphores, message queues
|
libghttp |
libghttp and ncurses
|
linefeeder |
how to read a newline delimited file into memory and parse that in-memory file for memory
|
ncurses |
add
|
pipes |
named, unnamed pipes, and a token ring example
|
select |
select syntax unblocking IO
|
signals |
add
|
socket_libs |
two networking libraries: networkinglib.c and uici libraries
|
socketsipv4 |
the standard unix sockets lib
|
threads |
POSIX pthreads samples, sample code
|
time |
add
|
unbufferedIO |
unix IO file descriptors as args unbuffered
|
usp_book |
unix systems programming book source code
|
--->create new sub-category
|
boundedbuffer.txt |
add
sem/boundedbuffer
threads/boundedbuffer
sem/sem.txt
|
checklocale.c |
add
#include <stdio.h>
checklocale2.c |
add
#include <stdio.h>
connection_communicationtwo.txt |
add
chapter 18 USP
==============
this operating systems course is only concerned with the theories not with the code in this section
0. client-server introduction
|
environ.c |
add
/* http://vip.cs.utsa.edu/usp/ dr.robbins utsa computer science "unix systems programming" */
getenv.c |
char * getenv("CAP_THING")
if (port <= 0) {
gettext.c |
add
// postgresql-7.4.1/src/backend/postmaster/postmaster.c
ipc.txt |
add
process synchronization
=======================
read sgz book chapter 7
process synchronization: getting processes to work together in a coordinated way.
|
linux_c_lib.htm |
add
|
mask_log.c |
demonstrate openlog() and family
/*
ncurses.htm |
add
|
networkinglib.c |
http://www.complete.org/publications/lpb/downloads/lpb-examples
/* try socket_libs/networkinglibs.c */
int main() {
printf("goto http://www.sirfsup.com/languages/c/unix_c/socket_libs/networkinglibs.c");
processes.txt |
add
|
seteuid.c |
seteuid
/*
setpgid.txt |
setpgid
1. Why do you have to call setpgid() when a process is supposed to run in the background?
When you create a process, it by default is created in a process group from which it was created ... When you run a command from the shell, the new process is created in that group ... and this group has a controlling tty ... obviously for backgrounding a process you need to disassociate from the controlling tty .... thus need for changing the process group
You create a separate group for the current process in which it will be the only process ... If setpgid creates groups if they do not exist, it will work like a charm
|
size_t.txt |
how big is size_t and ssize_t difference size_t and ssize_t
size_t and ssize_t
==================
size_t must be unsigned as defined in the ANSI, POSIX, and Single UNIX standards. A signed version ssize_t is defined in POSIX and Single UNIX.
The underlying definition of size_t is in stddef.h which is part of the compiler. A small test case on my Linux 6.2 using gcc version 2.95.2 gives the following in the -E output:
|
threads.htm |
add
try here
|
unix_types.htm |
add
| --->upload your article
|
User submitted category site links |
|
(None) | -->submit a page from your site dealing with unix_c to the sirfsup! web directory for listing | | | | | | | | |