Newbie question on C library system() function
- From: philbo30 <masferfc@xxxxxxxxx>
- Date: 13 May 2007 12:06:25 -0700
Newbie question here...
I need to send control data (rewind by 3 lines) to a kiosk printer via
a 115200 tty and then print out information associated with a
transaction. The problem is that my control command is executed via a
bash shell system() call which is apparently much slower than my c
data processing. The end result is a printer trying to back up and
move forward at the same time. Unpretty.
Here' s the code for the system call:
char backup[32]="echo -ne \033K7 > /dev/ttyS0 \n"
int rewindsome(void)
{
system(backup);
system(backup);
system(backup);
return 0;
}
I need to make sure that the function above fully completes before the
rest of my app executes. Ideas?
.
- Follow-Ups:
- Re: Newbie question on C library system() function
- From: Keith Thompson
- Re: Newbie question on C library system() function
- From: Walter Roberson
- Re: Newbie question on C library system() function
- Prev by Date: Re: What is wrong with this code?
- Next by Date: Re: Newbie question on C library system() function
- Previous by thread: What is wrong with this code?
- Next by thread: Re: Newbie question on C library system() function
- Index(es):