10 More Discussions You Might Find Interesting
1. Programming
Hi,
Can anyone tell me why the following program is giving compiler error when I use a friend function of a class as the comparison predicate for the third parameter of std::sort() algorithm? How to correct it, keep the 'friend' intact?
#include <iostream>
#include <vector>
#include <list>... (1 Reply)
Discussion started by: royalibrahim
1 Replies
2. Programming
I am getting a dereferencing pointer to incomplete type error when i compile the following code on lines highlighted in red. Can anyone help me in identifying what is wrong in the code?
#include<stdio.h>
#include<stdlib.h>
typedef struct{
int info;
struct node* link ;
} node;
void... (3 Replies)
Discussion started by: sreeharshasn
3 Replies
3. Shell Programming and Scripting
Below part of script, is working fine sometimes and gives error sometime.
I am doing float operations, checking if x > y.
##########CODE##########
THRESHOLD="1.25"
ratio=$( echo "scale=2; ${prev}/${current}" | bc )
if ; then
split_date=`echo ${line} | cut -d, -f2`
fi ... (9 Replies)
Discussion started by: manishma71
9 Replies
4. Shell Programming and Scripting
Hi ,
I want to write a shell script that can create oracle database user and grants permission to this user.
Thanks & Regards,
Deepak (4 Replies)
Discussion started by: Deepakjha
4 Replies
5. UNIX for Dummies Questions & Answers
I'm getting the following Error:
prepare_pcap.c: In function `prepare_pkts':
prepare_pcap.c:127: error: dereferencing pointer to incomplete type
prepare_pcap.c:138: error: dereferencing pointer to incomplete type
====================================
This is the part of the relevant... (8 Replies)
Discussion started by: katwala
8 Replies
6. Programming
If one wants to get a start address of a array or a string or a block of memory via a function, there are at least two methods to achieve it:
(1) one is to pass a pointer-to-pointer parameter, like:
int my_malloc(int size, char **pmem)
{
*pmem=(char *)malloc(size);
if(*pmem==NULL)... (11 Replies)
Discussion started by: aaronwong
11 Replies
7. UNIX for Advanced & Expert Users
Hi All,
i have an small issue...
echo " "
eval x=$@
export x=`echo $x`
echo $x
ssh user@ipadrss; cd /mbbv/home/;
cd /mbbv/home/orange/orange/
echo pwd
bash samplescript.sh $x
above is my script which will triger from server A and will connect to server B for some... (2 Replies)
Discussion started by: Shahul
2 Replies
8. Shell Programming and Scripting
Hi,
I use the following command
make all > output-`date +%F-%H-%M-%S`.txt 2>&1
to invoke a MAKE process that takes some weeks to complete. The ouput is redirected to a text file. Now I prefix the above command with time to get time needed for completion of the MAKE process
time make... (2 Replies)
Discussion started by: gkamendje
2 Replies
9. Programming
Hello all
Im using CC: Sun C++ 5.6 2004/07/15 and using the -library=stlport4 when linkning im getting
The fallowing error :
Undefined first referenced
symbol in file
std::ostream &std::ostream::operator<<(std::ios_base&(*)(std::ios_base&))... (0 Replies)
Discussion started by: umen
0 Replies
10. Shell Programming and Scripting
Hi
I want both standard output and standard error of my command cmd to go to the same file log.txt. please let me know the best commandline to do this.
Thanks (2 Replies)
Discussion started by: 0ktalmagik
2 Replies
shevek::process(3) Library Functions Manual shevek::process(3)
NAME
shevek::process -
Create a process, optionally connection its standard in- and output streams to the calling program.
SYNOPSIS
#include <process.hh>
Inherits shevek::refbase.
Public Member Functions
Glib::RefPtr< shevek::fd > in ()
The standard input pipe, if it was requested.
Glib::RefPtr< shevek::fd > out ()
The standard output pipe, if it was requested.
Glib::RefPtr< shevek::fd > err ()
The standard error pipe, if it was requested.
pid_t pid ()
The process ID.
~process ()
The destructor. This kills the process if it was still running.
Static Public Member Functions
static Glib::RefPtr< process > create (std::string const &command, std::list< std::string > &argv, bool pipe_stdin=true, bool
pipe_stdout=true, bool pipe_stderr=true)
Create a process from a filename and an argument list.
static Glib::RefPtr< process > create (std::string const &command, std::list< std::string > &argv, std::list< std::string > const &envp,
bool pipe_stdin=true, bool pipe_stdout=true, bool pipe_stderr=true)
Create a process from a filename, an argument list and an environment.
static Glib::RefPtr< process > shell (std::string const &command, bool pipe_stdin=true, bool pipe_stdout=true, bool pipe_stderr=true,
std::string const &sh='/bin/sh')
Run a string with the shell.
static std::string run (std::string const &command, std::string const &sh)
Run a process and return its output.
static Glib::RefPtr< process > create (std::string const &command, bool pipe_stdin=true, bool pipe_stdout=true, bool pipe_stderr=true)
Create a process without arguments.
static Glib::RefPtr< process > create (std::string const &command, std::string const &a1, bool pipe_stdin=true, bool pipe_stdout=true, bool
pipe_stderr=true)
Create a process with one argument.
static Glib::RefPtr< process > create (std::string const &command, std::string const &a1, std::string const &a2, bool pipe_stdin=true, bool
pipe_stdout=true, bool pipe_stderr=true)
Create a process with two arguments.
static Glib::RefPtr< process > create (std::string const &command, std::string const &a1, std::string const &a2, std::string const &a3,
bool pipe_stdin=true, bool pipe_stdout=true, bool pipe_stderr=true)
Create a process with three arguments.
static Glib::RefPtr< process > create (std::string const &command, std::string const &a1, std::string const &a2, std::string const &a3,
std::string const &a4, bool pipe_stdin=true, bool pipe_stdout=true, bool pipe_stderr=true)
Create a process with four arguments.
static Glib::RefPtr< process > create (std::string const &command, std::string const &a1, std::string const &a2, std::string const &a3,
std::string const &a4, std::string const &a5, bool pipe_stdin=true, bool pipe_stdout=true, bool pipe_stderr=true)
Create a process with five arguments.
static Glib::RefPtr< process > create (std::string const &command, std::string const &a1, std::string const &a2, std::string const &a3,
std::string const &a4, std::string const &a5, std::string const &a6, bool pipe_stdin=true, bool pipe_stdout=true, bool
pipe_stderr=true)
Create a process with six arguments.
static Glib::RefPtr< process > create (std::string const &command, std::string const &a1, std::string const &a2, std::string const &a3,
std::string const &a4, std::string const &a5, std::string const &a6, std::string const &a7, bool pipe_stdin=true, bool
pipe_stdout=true, bool pipe_stderr=true)
Create a process with seven arguments.
static Glib::RefPtr< process > create (std::string const &command, std::string const &a1, std::string const &a2, std::string const &a3,
std::string const &a4, std::string const &a5, std::string const &a6, std::string const &a7, std::string const &a8, bool
pipe_stdin=true, bool pipe_stdout=true, bool pipe_stderr=true)
Create a process with eight arguments.
static Glib::RefPtr< process > create (std::string const &command, std::string const &a1, std::string const &a2, std::string const &a3,
std::string const &a4, std::string const &a5, std::string const &a6, std::string const &a7, std::string const &a8, std::string const
&a9, bool pipe_stdin=true, bool pipe_stdout=true, bool pipe_stderr=true)
Create a process with nine arguments.
Detailed Description
Create a process, optionally connection its standard in- and output streams to the calling program.
Member Function Documentation
static std::string shevek::process::run (std::string const &command, std::string const &sh) [static]
Run a process and return its output. A convenience function for running a process and catching its standard output in a string. This blocks
until the process has exited.
static Glib::RefPtr<process> shevek::process::shell (std::string const &command, boolpipe_stdin = true, boolpipe_stdout = true, boolpipe_stderr
= true, std::string const &sh = '/bin/sh') [inline, static]
Run a string with the shell. Note that the process is forked from the shell, and so does not get killed when the process goes away.
Author
Generated automatically by Doxygen for libshevek from the source code.
libshevek Fri May 11 2012 shevek::process(3)