I don't know how to send the data to the pipes in the execl program.
If you want to send data to esclavo's standard input, you will need another pipe.
If you want to read data from esclavo's standard output, read() from the read-end of the pipe in the parent.
You don't need declare anything or do anything special in the esclavo program itself. It can just read standard input and write to standard output as usual. By overriding the value of stdout with dup2(), you will cause esclavo to write to the pipe whenever it writes to standard output.
Hi!
I'm writing a C program which gets from the command line a shell command (such as "ls" ) and I should execute it.
My Q is: how can I send a command to the shell?
I know I have to use one of the above functions, but I don't know how to use them.
Thanks
eyal (1 Reply)
Hi,
Is it possible to run a program from my C program using only the full pathname?
for example if I wanna call: "ls", so I whould have to use:
execl("/bin/ls", "ls", NULL);
Is it possible to do this using only:
"/bin/ls"
thanks (1 Reply)
I want to make simultanous sh commands in an exec command
for example I want to counts the lines in a file
wc -l my file.txt | awk -F" " '{print $1}'` works fine in sh but I want to implement it in a c code
the first part works like this
execl("/usr/bin/wc", "wc", "-l", "myfile.txt",... (1 Reply)
Hi,
we would appreciate if any one answer the below query.
void main()
{
printf(“ I am in main\n”);
execl(“/HOME/source/file2”,” /HOME/source/file2”,1,0);
printf(“after execl\n”);
}
How to step the file2 source code in GDB. (2 Replies)
hello everybody
how can i time the execution of execl() command inside my C code?
for example, i wrote..
execl("md5sum","md5sum","myprog",NULL);
i want to count the duration of the execl command!
thanx in advance! (2 Replies)
how to use find command in execl function,
I used:
execl("/usr/bin/find","find","~","-name","filename.c",0); but it shows
find: ~ no file and directory i need to get the path of the file from the home .:wall: (2 Replies)
when execl fails using the command lss, it doesnt go into the next line
execl("/bin/sh", "/bin/sh", "-c", command, NULL);
perror("execl failed"); exit(127);
for some reason the child process just stops and also the parent process also stops
so the line after the line that... (3 Replies)
Hi,
If I write in a c file :
execlp("date","date",NULL);
printf("A\n");
And then run through the terminal would "A" be printed ?
I understood that execlp will exit the program after it finished so the next lines of code won`t be executed afterwards.. Is that true ? (1 Reply)
Discussion started by: uniran
1 Replies
LEARN ABOUT NETBSD
adv
ADV(4) BSD Kernel Interfaces Manual ADV(4)NAME
adv -- ConnectCom Solutions AdvanSys SCSI adapter driver
SYNOPSIS
adv* at pci? dev ? function ?
adv0 at isa? port ? irq ? drq ?
adv* at cardbus? function ?
scsibus* at adv?
DESCRIPTION
The adv driver supports the following AdvanSys SCSI host adapters
PCI bus
Connectivity Products:
ABP920 Bus-Master PCI (16 CDB)
ABP930 Bus-Master PCI (16 CDB) (note 1)
ABP930U Bus-Master PCI Ultra (16 CDB)
ABP930UA Bus-Master PCI Ultra (16 CDB)
ABP960 Bus-Master PCI MAC/PC (16 CDB) (note 2)
ABP960U Bus-Master PCI MAC/PC Ultra (16 CDB) (note 2)
Notes:
1. This board has been sold by SIIG as the Fast SCSI Pro PCI.
2. This board has been sold by Iomega as a Jaz Jet PCI adapter.
Single Channel Products:
ABP940 Bus-Master PCI (240 CDB)
ABP940U Bus-Master PCI Ultra (240 CDB)
ABP970 Bus-Master PCI MAC/PC (240 CDB)
ABP970U Bus-Master PCI MAC/PC Ultra (240 CDB)
ABP940UW Bus-Master PCI Ultra-Wide (240 CDB)
Multi Channel Products:
ABP950 Dual Channel Bus-Master PCI (240 CDB Per Channel)
ABP980 Four Channel Bus-Master PCI (240 CDB Per Channel)
ABP980U Four Channel Bus-Master PCI Ultra (240 CDB Per Channel)
ISA bus
Connectivity Products:
ABP510/5150 Bus-Master ISA (240 CDB) (note 1)
ABP5140 Bus-Master ISA (16 CDB) (note 1) (note 2)
ABP5142 Bus-Master ISA with floppy (16 CDB) (note 3)
Notes:
1. This board has been shipped by HP with the 4020i CD-R drive. The board has no BIOS so it cannot control a boot device, but it can con-
trol any secondary SCSI device.
2. This board has been sold by SIIG as the i540 SpeedMaster.
3. This board has been sold by SIIG as the i542 SpeedMaster.
Single Channel Products:
ABP542 Bus-Master ISA with floppy (240 CDB)
ABP842 Bus-Master VL (240 CDB)
Dual Channel Products:
ABP852 Dual Channel Bus-Master VL (240 CDB Per Channel)
SEE ALSO cd(4), ch(4), intro(4), isa(4), pci(4), scsi(4), sd(4), st(4)
http://www.connectcom.net/
http://www.siig.com/
HISTORY
The adv device driver appeared in NetBSD 1.4.
AUTHORS
Baldassare Dante Profeta <dante@mclink.it>
BSD June 4, 1999 BSD