02-13-2002
Compiling with g++ on an OpenBSD 3.0 box, I get a "Memory Fault", and it dumps core when I try to run a command, like "ls".
The exit value is 139, and gdb reports a "Program received signal SIGSEGV, Segmentation fault.
0x1ad8 in main () "
Is this machine specific?
(I'm a no-C / C++ goof - Trying, though)
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 PHP
pcntl_fork
PCNTL_FORK(3) 1 PCNTL_FORK(3)
pcntl_fork - Forks the currently running process
SYNOPSIS
int pcntl_fork (void )
DESCRIPTION
The pcntl_fork(3) function creates a child process that differs from the parent process only in its PID and PPID. Please see your system's
fork(2) man page for specific details as to how fork works on your system.
RETURN VALUES
On success, the PID of the child process is returned in the parent's thread of execution, and a 0 is returned in the child's thread of
execution. On failure, a -1 will be returned in the parent's context, no child process will be created, and a PHP error is raised.
EXAMPLES
Example #1
pcntl_fork(3) example
<?php
$pid = pcntl_fork();
if ($pid == -1) {
die('could not fork');
} else if ($pid) {
// we are the parent
pcntl_wait($status); //Protect against Zombie children
} else {
// we are the child
}
?>
SEE ALSO
pcntl_waitpid(3), pcntl_signal(3), setproctitle(3).
PHP Documentation Group PCNTL_FORK(3)