Changeset 635
- Timestamp:
- Jan 5, 2016, 11:11:45 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
rpm/trunk/cliutils.c
r634 r635 56 56 57 57 char cmdline[16*1024]; 58 sprintf( cmdline, "sh -c %s", rpmcliPipeOutput); 58 // place command line inside quotes to allow sh to execute all commands 59 // itself (otherwise also cmd is involved) 60 sprintf( cmdline, "sh -c \"%s\"", rpmcliPipeOutput); 59 61 // start child and redirect its input to us 60 62 pipeFD = popen( cmdline, "w"); 63 if (pipeFD == NULL) { 64 fprintf(stderr, "creating a pipe for --pipe failed: %s\n", cmdline); 65 return -1; 66 } 61 67 // now redirect stdout to input handle 62 68 dup2( fileno(pipeFD), STDOUT_FILENO);
Note:
See TracChangeset
for help on using the changeset viewer.