11-14-2007
agree
. However in repeated runs, the program variables are allocated the same memory location.
Even on reading in a very large string (20 chars) and sending it to sprintf, it is surprising how there is no segmentation fault.
At some point, unless 'k' is pointing to stdout, the length of the memory should cause violation, and program should get SEGV right?
Also, if at all 'k' points to stdout, on doing a flush immediately, i should see the contents of 'k' right? coz it sould overwrite previous contents of stdout.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I am getting this message when I run my script.
$ runscript.sh
Not connected to any service!
Here is the beginning of the script:
# 1 - failure
#
# variable declaration
FILEDATE=`date +"%Y%m%d"`
Not connected to any service!
Right after the FILEDATE gets loaded I get that... (6 Replies)
Discussion started by: lesstjm
6 Replies
2. Programming
I have encountered a strange problem dealing with pipes
and forking. The program basicaly does this:
cat file | tbl | eqn | groff
Now, I have a parent process that forks children
that that exec the stuff that they should. The pipes defined
in the parent are the ones used.
The chain goes... (1 Reply)
Discussion started by: denoir
1 Replies
3. Solaris
Hi!
I own a sparc 5 and i seem to have a strange problem. When its off, it starts by itself...
Sounds a bit strange? Iknow. Does anyone know whats causing this?? Could it be the network card? or is it someting in ENV or some other configuration??
//dOzY (5 Replies)
Discussion started by: dozy
5 Replies
4. UNIX for Dummies Questions & Answers
I have Debian Etch release as a fresh install on a PIII to be a router/firewall. I've configured networking, and utilized Shorewall to set up iptables scripting. I've installed dhcp3, both client and server, to pull an ip from my broadband cable modem, and dish out ip's to a switch for other... (2 Replies)
Discussion started by: pflink
2 Replies
5. Programming
Hi,
Currently, i have an application that does logging of messages into a text file and i record the timing for the messages in a format. However, i need to log the messages up to millisec level and the struct tm i am using now only support up to sec, is there any other way to get millisec?
... (2 Replies)
Discussion started by: dwgi32
2 Replies
6. UNIX for Advanced & Expert Users
hello...
thats a great forum btw :)
my problem is that I need a list of the Base Level Filesets (BLF) which are needed by a specific program.
Is there any command/tool which shows me that?
during the installation I can choose "Preview only" so that I can see what BLF´s are missing etc but... (4 Replies)
Discussion started by: cypher82
4 Replies
7. UNIX for Dummies Questions & Answers
Hi guys ,
This is the first time i m running java application inside linux.
i have installed jdk-6u20-linux-i586-rpm.bin jre-6u20-linux-i586-rpm.bin in my linux machine.
and set JAVA_HOME and JRE_HOME variables respectively.
# echo $JAVA_HOME
/usr/java/jdk1.6.0_20/
# echo $JRE_HOME... (6 Replies)
Discussion started by: pinga123
6 Replies
8. Debian
Hi everyone, I have an issue with a project of mine. I have to run a program on a terminal which requires to be logged in as su to have it run it. Given that I'm having problem to use expect to give the password I'd like to change the privilege of that program from SU to normal user ( I have the SU... (13 Replies)
Discussion started by: gaisselick87
13 Replies
9. Programming
Hello all ,
i need some help asap
i have a program that keeps killing the machine
when i did google searches and 2 days later i ran strace
it seems the programm keeps making a system call to gettimeofday
to i guess increment a counter ?
gettimeofday({1347986584, 464904}, NULL) = 0... (6 Replies)
Discussion started by: NetworkLearning
6 Replies
10. Homework & Coursework Questions
Hello,
I would like to build some sample C++ application on Solaris SunOS 5.8 Generic Virtual sun4v sparc.
so I would like to know what are the compilation utilities and runtime utilities I need to get in my machine
and will any one explain me the detaied life cycle of program like
what... (1 Reply)
Discussion started by: Revathi R
1 Replies
LEARN ABOUT DEBIAN
pbsdsh
pbsdsh(1B) PBS pbsdsh(1B)
NAME
pbsdsh - distribute task to nodes under pbs
SYNOPSIS
pbsdsh [-c copies] [-o] [-s] [-u] [-v] program [args]
pbsdsh [-n node] [-o] [-s] [-u] [-v] program [args]
pbsdsh [-h nodename] [-o] [-v] program [args]
DESCRIPTION
Executes (spawns) a normal Unix program on one or more nodes under control of the Portable Batch System, PBS. Pbsdsh uses the Task Manager
API, see tm_spawn(3), to distribute the program on the allocated nodes.
When run without the -c or the -n option, pbsdsh will spawn the program on all nodes allocated to the PBS job. The spawns take place con-
currently - all execute at (about) the same time.
Users will find the PBS_TASKNUM , PBS_NODENUM , and the PBS_VNODENUM environmental variables useful. They contain the TM task id, the node
identifier, and the cpu (virtual node) identifier.
OPTIONS
-c copies
The program is spawned on the first Copies nodes allocated. This option is mutual exclusive with -n.
-n node
The program is spawned on one node which is the node-th node allocted. This option is mutual exclusive with -c.
-h hostname
The program is spawned on the node specified.
-o Capture stdout of the spawned program. Normally stdout goes to the job's output.
-s If this option is given, the program is run in turn on each node, one after the other.
-u The program is run once on each node (unique). This ignores the number of allocated processers on a given node.
-v Verbose output about error conditions and task exit status is produced.
OPERANDS
The first operand, program, is the program to execute.
Additional operands, args, are passed as arguments to the program.
STANDARD ERROR
The pbsdsh command will write a diagnostic message to standard error for each error occurrence.
EXIT STATUS
Upon successful processing of all the operands presented to the command, the exit status will be a value of zero.
If the pbsdsh command fails to process any operand, or fails to contact the MOM daemon on the localhost the command exits with a value
greater than zero.
SEE ALSO
qsub(1B), tm_spawn(3B)
Local pbsdsh(1B)