Here are some of the errors, you may correct to improve your program ...
Quote:
Originally Posted by beandj
i dont know how to create a two-way pipes
i need to send father-to-child a pair line of teste.txt
and send child-to-faher a odd line of teste.txt
and i need to print in two diferent .txt
but the program do nothing
There are atleast 3 errors, I could figure out. They are following:
1) You have not declered & defined pf,
2) You have not declered & defined fp,
3) You have not initilize pos; its using a garbage value.
The worst part is that you are controlling the program flow using and AND condition with (pid == 0) && (pos % 2 == 0). You are taking the mod of a garbage value, isn't it?
Now could you please try to analyse the result of that if() expression for the below two cases:
1) When pos has a garbage value which is an odd number,
2) When pos has a garbage value which is an even number
I think its pretty enough for you to know what went wrong.
Also, just declare & define pf and fp as below:
Rest is okey in your program.
Hi,
I am working on AIX 5.3 . I have client-server program which is in ProC.while sending packet to server i am getting error as broken pipe and program exiting.
please help?/? (1 Reply)
Hi all...
I have the following code:
FILE *fp = popen(" gzip -dc /somemount/somefile.gz", "r");
while(fgets(buffer, 1024, fp))
{
some code....
}
"/somemount" is a mount of some network drive. Sometimes error occurs in while loop - I can see the following "Input/Output error"... (4 Replies)
All,
I am using the below code
The C code :
if ((fp2=fopen(szout_fname,"r"))==NULL)
{
sprintf(stream_ptr1,"cat %s | sort -t, -rn -k 11,11 | awk -F\",\" '{ \
if ( \$3 ==\"%s\" ) {print... (0 Replies)
I want to try the unix pipe, the command is like this:
echo new | find .
the standard output of the echo should be "new", then I guess find command will use this output as input to find the file named "new". But the output is all the file names in my current dir, the last line is "echo: write... (5 Replies)
Hello
while doing sftp over server "A" , i am getting a broken pipe error i.e
cat: write error: Broken pipe
what does that mean? please let me know if you want any other info on this.. (3 Replies)
I'm new to scripting, and this forum has been invaluable in helping me out. I'm hoping I can get some personal help now though.
I have a korn script that takes a list of servers and either telnets or sshs into it (only some are set up for ssh). What I'm doing now is trying to telnet first, and... (10 Replies)
Hi
I am quite new to scripting and cannot work out how to do the following -
I want to pipe to a log file and then use the "last statement error" in an if statement after, and this doesn't work because it checks the pipe statement instead of the script.
Example:
executteTheScript $var |... (4 Replies)
Hi,
I have a script that runs a tar command to standard out then pipes to a gzip:
tar cfE - * | gzip -c > OUT.gz
At the moment, even if the tar fails (e.g. because of lack of disk space), the gzip still runs successfully.
Is there a way to make the whole line exit with a non-zero error... (6 Replies)
Hello,
I am trying to stream lines written into file. When first source is down, I expect the code to swap to second line and run it.
Script below works as usual and it prints out each line of the input file (s.txt):
#!/bin/bash
while read -r line;
do
echo "$line"
done <"$1"
exit 0Output... (12 Replies)
To begin with FYI, I really struggled with the question before asking to simplify as much as I can around 1 hour and to increase the code's readability I neglect error checks.
I intend to communicate parent and child using PIPE. In the following program I do traverse given path and its... (2 Replies)
Discussion started by: beginnerboy
2 Replies
LEARN ABOUT DEBIAN
flarq
FLARQ(1)FLARQ(1)NAME
flarq - ARQ data transfer utility for fldigi
SYNOPSIS
flarq [OPTIONS]
DESCRIPTION
Flarq (fast light automatic repeat request) is a file transfer application that is based on the ARQ specification developed by Paul
Schmidt, K9PS. It is capable of transmitting and receiving frames of ARQ data via fldigi, as well as MultiPSK on Windows.
OPTIONS
Long options begin with two hyphens and are handled by flarq. The option names may be abbreviated to any unambiguous substring, and the
option argument may be separated from the name by a space or equals sign, as per getopt(3).
Short options begin with a single hyphen and are passed directly to FLTK. They may be abbreviated only as indicated.
--arq-protocol TYPE
Set the ARQ protocol. May be either "fldigi" or "multipsk". Defaults to "fldigi".
--arq-server-address HOSTNAME
Set the ARQ TCP server address. Defaults to "127.0.0.1". HOSTNAME may be any node name string accepted by getaddrinfo(3).
--arq-server-port PORT
Set the ARQ TCP server port. Defaults to "7322". PORT may be any service name string accepted by getaddrinfo(3).
--debug
Enable debugging messages.
--version
Print version information and exit.
--build-info
Print build information and exit.
--help
Print options summary and exit.
Standard FLTK options
-bg, -background COLOUR
Set the background colour.
-bg2, -background2 COLOUR
Set the secondary (text) background colour.
-di, -display DISPLAY
Specifies the X server to connect to; see X(7).
-dn, -dnd or -nodn, -nodnd
Enable or disable drag and drop copy and paste in text fields.
-fg, -foreground COLOUR
Set the foreground colour.
-g, -geometry GEOMETRY
Set the initial window size and position. Flarq may not honour this option.
-i, -iconic
Start flarq in iconified state. Flarq may not honour this option.
-k, -kbd or -nok, -nokbd
Enable or disable visible keyboard focus in non-text widgets.
-na, -name CLASSNAME
Set the window class. Defaults to "Flarq".
-ti, -title WINDOWTITLE
Set the window title. Defaults to "flarq - <callsign>".
Additional UI options
--font FONT[:SIZE]
Set the widget font and (optionally) size. Defaults to "sans:12".
FILES
$HOME/.flarq
The main settings file.
The following directories are used to interface with MUAs such as Sylpheed:
$HOME/Mail/ARQin
Stores incoming email messages.
$HOME/Mail/ARQout
Stores outgoing email messages.
$HOME/Mail/ARQsent
Stores sent email messages.
The following directories are used for ARQ file transfer:
$HOME/ARQrecv
Stores received files.
$HOME/ARQsend
Stores files to be transmitted.
$HOME/ARQfiles/logfile.txt
Stores transfer logs.
BUGS
o There are no command line arguments to override the default configuration file and ARQ and Mail directories.
SEE ALSO fldigi(1), getaddrinfo(3), getopt(3), X(7)RESOURCES
Flarq web site: http://www.w1hkj.com/flarq_main.html
Fldigi web site: http://www.w1hkj.com/Fldigi.html
BerliOS project page: http://developer.berlios.de/projects/fldigi/
ARQ specification by Paul Schmidt, K9PS: http://www.w1hkj.com/FlarqHelpFiles/ARQ2.pdf
AUTHORS
Flarq was written by David Freese, W1HKJ.
This manual page was written by Stelios Bounanos <sb[at]enotty(dot)net>.
COPYING
License GPLv3+: GNU GPL version 3 or later.
07/01/2012 FLARQ(1)