06-19-2009
i am receiving data from socket ...Please find the codes for that...
memset(recvgen,' ',NSE_MAX_PACKET_RECV_SIZE);
recv_bytes = recvfrom(sockfd1,recvgen,NSE_MAX_PACKET_RECV_SIZE,0,(struct sockaddr *)&serv_addr,&clilen)
10 More Discussions You Might Find Interesting
1. Programming
Code : function sSaveTFFile
.......................
iRetCode = link (caCurrentFilename, caBackupFilename);
if (iRetCode == -1)
{
ERR_MSG2(LOG_ALERT, "Can't move %s to %s", caCurrentFilename, caBackupFilename);
return(FAILURE);
}
iRetCode = unlink... (6 Replies)
Discussion started by: fermisoft
6 Replies
2. Programming
I am working on the application in which I have to fetch values from the database and paste in url and send it to portal.
table=get_result("SELECT serialno,cas,Mode,FLC,TLC,location,CompName,CompCode,FG,FC,DispNo,TruckNo,LWbill,RRGPN,INVNO,DCN,RQTY,DQTY,SQTY,DDATE,RDATE,SDATE,TTIME FROM... (1 Reply)
Discussion started by: er.rohan88
1 Replies
3. Programming
I'm getting a segmentation fault. I'm new to Linux programming. Thanks so much for all of your input.:eek:
#include </usr/include/mysql++/mysql++.h>
#include <stdio.h>
#include <iostream>
#include <sstream>
#include <string.h>
using namespace std;
int outputToImport(const char*... (1 Reply)
Discussion started by: sepoto
1 Replies
4. Programming
This code is causing a segmentation fault and I can't figure out why. I'm new to UNIX and I need to learn how to avoid this segmentation fault thing. Thank you so much. Thanks also for the great answers to my last post.:):b:
int main()
{
mysqlpp::Connection conn(false);
if... (3 Replies)
Discussion started by: sepoto
3 Replies
5. Programming
I use a binary name (ie polo) it gets some parameter , so for debugging normally i do this :
i wrote script for watchdog my app (polo) and check every second if it's not running then start it , the problem is , if my app , remain in state of segmentation fault for a while (ie 15 ... (6 Replies)
Discussion started by: pooyair
6 Replies
6. Programming
The fwrite function call is not returning error, when the file it writes to is removed, please advise on how to find if the file already opened and being written by a program is removed manually or by some other process.
please see the code below,
#include<stdio.h>
#include<stdlib.h>
... (3 Replies)
Discussion started by: Kesavan
3 Replies
7. Shell Programming and Scripting
I am getting Segmentation fault at below function call in my script:
get_x() {
sqlplus -s / <<end | grep KEEP | sed 's/KEEP//;s///g'
select 'KEEP' ,table_name from all_synonyms where upper(synonym_name)= '$1';
exit
end
x=$(get_x $1)
echo " SQL OUTPUT IS :: $x"
}
I am getting output of... (1 Reply)
Discussion started by: IB_88
1 Replies
8. UNIX for Dummies Questions & Answers
I have some matlab code that sends the serial port elements of an array using matlab's fwrite function, e.g.:
fwrite(s, , 'uchar');
What would be a unix shell equivalent? E.g., after successfully accessing the port using instructions here:
Simple terminal serial port program for Linux/MacOSX... (3 Replies)
Discussion started by: darwin_886
3 Replies
9. Programming
I am passing a char* to the function "reverse" and when I execute it with gdb I get:
Program received signal SIGSEGV, Segmentation fault.
0x000000000040083b in reverse (s=0x400b2b "hello") at pointersExample.c:72
72 *q = *p;
Attached is the source code.
I do not understand why... (9 Replies)
Discussion started by: jose_spain
9 Replies
10. Programming
Oddities with gcc, 2.95.3 for the AMIGA and 4.2.1 for MY current OSX 10.14.1...
I am creating a basic calculator for the AMIGA ADE *NIX emulator in C as it does not have one.
Below are two very condensed snippets of which I have added the results inside the each code section.
IMPORTANT!... (11 Replies)
Discussion started by: wisecracker
11 Replies
LEARN ABOUT DEBIAN
explain_fwrite_or_die
explain_fwrite_or_die(3) Library Functions Manual explain_fwrite_or_die(3)
NAME
explain_fwrite_or_die - binary stream output and report errors
SYNOPSIS
#include <libexplain/fwrite.h>
size_t explain_fwrite_or_die(const void *ptr, size_t size, size_t nmemb, FILE *fp);
DESCRIPTION
The explain_fwrite_or_die function is used to call the fwrite(3) system call. On failure an explanation will be printed to stderr,
obtained from explain_fwrite(3), and then the process terminates by calling exit(EXIT_FAILURE).
This function is intended to be used in a fashion similar to the following example:
size_t result = explain_fwrite_or_die(ptr, size, nmemb, fp);
ptr The ptr, exactly as to be passed to the fwrite(3) system call.
size The size, exactly as to be passed to the fwrite(3) system call.
nmemb The nmemb, exactly as to be passed to the fwrite(3) system call.
fp The fp, exactly as to be passed to the fwrite(3) system call.
Returns:
This function only returns on success. On failure, prints an explanation and exits.
SEE ALSO
fwrite(3)
binary stream output
explain_fwrite(3)
explain fwrite(3) errors
exit(2) terminate the calling process
COPYRIGHT
libexplain version 0.52
Copyright (C) 2008 Peter Miller
explain_fwrite_or_die(3)