02-14-2002
I just downloaded the code and works for me on Sun. I don't see anything machine specific here. He is not testing for too many arguments and, if you entered 20 or more arguments to that ls, you could get a memory fault. Could that be it?
8 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I've just installed redhat 6.2 on one of my systems and am trying to install the gcc c compiler after downloading an rpm from the redhat site. The damn thing gives me:
only major numbers <= 3 are supported by this version of RPM
what do I do, it does the same with the latest rpm of php
... (7 Replies)
Discussion started by: knmwt15000
7 Replies
2. Shell Programming and Scripting
Hi everyone,
I have a requirement that requires me to fill an sqlite database with 100,000 entries (no duplicates).
I will start out by giving the command that will insert the values necessary to populate the database:
# sqlite /var/local/database/dblist "insert into list... (2 Replies)
Discussion started by: ogoy
2 Replies
3. Shell Programming and Scripting
I've been able to generate output based on the code scarfake provided me (thanks again man).
A little background so everyone more or less knows whats going on:
I needed code that would propagate a database with 100,000 entries, for capacity testing purposes, something like a stress test.
... (5 Replies)
Discussion started by: ogoy
5 Replies
4. UNIX for Dummies Questions & Answers
:eek: (1 Reply)
Discussion started by: Kevinfine
1 Replies
5. What is on Your Mind?
I don't want to speak about the goods or bads of both kinds of Operating systems, I only want to share a little experience with you to comment it.
I live in Spain and I have home some old unix systems, some of them that I want to sell or change for other things, like a pair of Sun Blade 2000... (0 Replies)
Discussion started by: Golfonauta
0 Replies
6. Shell Programming and Scripting
I have a file that is 20 - 80+ MB in size that is a certain type of log file.
It logs one of our processes and this process is multi-threaded. Therefore the log file is kind of a mess. Here's an example:
The logfile looks like: "DATE TIME - THREAD ID - Details", and a new file is created... (4 Replies)
Discussion started by: elinenbe
4 Replies
7. Shell Programming and Scripting
I am writing a bash script to automate the installation of web environment on a base install of Fedora. And I'm at the limit of my last nerve and my bash skills. My brain is screaming at me: "Give up and use perl", but I am trying to stick to bash since the script will modify the perl environment... (6 Replies)
Discussion started by: lbe
6 Replies
8. Programming
Hi guys!
I'll simplify my problem. I have the following code:
#include <fcntl.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <signal.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/wait.h>
#define max 25
#define buffdim 50
void p1();
void p2();... (2 Replies)
Discussion started by: pfpietro
2 Replies
LEARN ABOUT FREEBSD
vfork
VFORK(2) BSD System Calls Manual VFORK(2)
NAME
vfork -- create a new process without copying the address space
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <unistd.h>
pid_t
vfork(void);
DESCRIPTION
The vfork() system call can be used to create new processes without fully copying the address space of the old process, which is horrendously
inefficient in a paged environment. It is useful when the purpose of fork(2) would have been to create a new system context for an
execve(2). The vfork() system call differs from fork(2) in that the child borrows the parent's memory and thread of control until a call to
execve(2) or an exit (either by a call to _exit(2) or abnormally). The parent process is suspended while the child is using its resources.
The vfork() system call returns 0 in the child's context and (later) the pid of the child in the parent's context.
The vfork() system call can normally be used just like fork(2). It does not work, however, to return while running in the child's context
from the procedure that called vfork() since the eventual return from vfork() would then return to a no longer existent stack frame. Be
careful, also, to call _exit(2) rather than exit(3) if you cannot execve(2), since exit(3) will flush and close standard I/O channels, and
thereby mess up the parent processes standard I/O data structures. (Even with fork(2) it is wrong to call exit(3) since buffered data would
then be flushed twice.)
RETURN VALUES
Same as for fork(2).
SEE ALSO
_exit(2), execve(2), fork(2), rfork(2), sigaction(2), wait(2), exit(3)
HISTORY
The vfork() system call appeared in 2.9BSD.
BUGS
To avoid a possible deadlock situation, processes that are children in the middle of a vfork() are never sent SIGTTOU or SIGTTIN signals;
rather, output or ioctl(2) calls are allowed and input attempts result in an end-of-file indication.
BSD
November 13, 2009 BSD