Error Bad File Descriptor Linux
Contents |
here for a quick overview of the site Help Center Detailed answers to any bad file descriptor socket questions you might have Meta Discuss the workings and policies
What Is Bad File Descriptor
of this site About Us Learn more about Stack Overflow the company Business Learn more about
Bad File Descriptor C
hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack
Bad File Descriptor Error In C
Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Bad File Descriptor with Linux Socket write() Bad File Descriptor C up vote -1 down vote favorite I have an interesting problem with write(2) function. PrepareResponseForSetCoordinates function causes bad bad file descriptor python socket file descriptor error on write. Here is the line of error: perror("ERROR writing to socket"); total output: ERROR writing to socket: Bad file descriptor I am sure that I have established the connection because PrepareResponseForConnectionTest works like a charm. Can you have any idea about the reason of the error? When I use gcc as compiler there was no problem. After that because of using multiple new cpp sources I am using g++ as compiler and I have this error. Regards Here below my code: #define MAX_PMS_MESSAGE_LEN (4096) unsigned char baCommBuffer[MAX_PMS_MESSAGE_LEN]; unsigned char PrepareResponseForSetCoordinates(void) { unsigned char baTempBuff[255]={0}; unsigned short bCnt=0,i=0,bCsum=0,bCnt2=0; time_t lEpochTime; time_t lSessionTime; memset(baTempBuff,0,sizeof(baTempBuff)); memset(baCommBuffer,0,sizeof(baCommBuffer)); bzero(baCommBuffer,MAX_PMS_MESSAGE_LEN); bzero(baTempBuff,sizeof(baTempBuff)); lEpochTime = time(NULL); baCommBuffer[bCnt++] = START_CHAR; baCommBuffer[bCnt++] = START_CHAR; baCommBuffer[bCnt++] = PACKET_SEPERATOR; sprintf((char*)baTempBuff,"%ld",(unsigned long)lEpochTime); memcpy(baCommBuffer+bCnt,baTempBuff,10); bzero(baTempBuff,sizeof(baTempBuff)); bCnt+=10; baCommBuffer[bCnt++] = PACKET_SEPERATOR; // lSessionTime = time(NULL); if(SPMSMessage.lSessionID) lSessionTime = SPMSMessage.lSessionID; else lSessionTime=lEpochTime; sprintf((char*)baTempBuff,"%ld",(unsigned long)lSessionTime); memcpy(baCommBuffer+bCnt,baTempBuff,10); bzero(baTempBuff,sizeof(baTempBuff)); bCnt+=10; baCommBuffer[bCnt++] = PACKET_SEPERATOR; baCommBuffer[bCnt++] = PMC_ID; baCommBuffer[bCnt++] = PACKET_SEPERATOR; baCommBuffer[bCnt
here for a quick overview of the site Help Center Detailed answers what does bad file descriptor mean to any questions you might have Meta Discuss the workings bad file descriptor shell script and policies of this site About Us Learn more about Stack Overflow the company Business bad file descriptor select Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack http://stackoverflow.com/questions/11258781/bad-file-descriptor-with-linux-socket-write-bad-file-descriptor-c Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Linux Socket Bad file Descriptor up vote 0 down vote favorite Ok,i couldn’t find if this is a duplicate or no, so i decided to http://stackoverflow.com/questions/29400649/linux-socket-bad-file-descriptor post. We're getting into Sockets (beginner level sockets) now and i had be given this code to make the client send a simple message to the server by using send() and recv(). However, everything i tried doesn’t seem to get rid of the "error: Bad File Descriptor" and newsockfd always returns the value -1. Im just confused and have no idea why it doesn’t work. I've been given 3 files. defs.h #include
Español Nederlands 中文(简体) 日本語 https://www.veeam.com/kb1741 Česky Polski Türkçe Português(BR) Español(LA) Resource Pages https://www.howtoforge.com/community/threads/apache-error-bad-file-descriptor-apr_socket_accept.26571/ Svenska עברית Sign In Go! Downloads Contact Sales Sales Hotline: +44-800-012-4467 GMT 8:00am – 6:00pm Back Downloads Contact Sales solutionsProductsHow to buyService ProvidersPartnersResourcesCompanySupport Business sizeEnterprise and Medium BusinessSmall BusinessVertical SegmentFederal bad file Government (FED)State & Local Government/Education (SLED)CloudVeeam Cloud SolutionsDisaster Recovery-as-a-Service (DRaaS)Service ProviderVirtualization PlatformMicrosoftVMwareStorage and ServerNetAppHPECiscoDell EMC All Success StoriesAvailability for the Always-On EnterpriseVeeam Availability PlatformVirtual Workloads (VMware and Hyper-V)Veeam Availability Suitev9Veeam Backup & Replication v9Veeam Availability ConsoleCloud and Physical bad file descriptor WorkloadsVeeam Agent for Microsoft WindowsVeeam Agent for LinuxVeeam Availability ConsoleDisaster Recovery OrchestrationVeeam Availability OrchestratorSmall Business under 250 employeesVeeam Backup Essentialsv9Veeam vs. CompetitionCloud and Service ProvidersVCSP Program and Product OfferingsVeeam Availability ConsoleMonitoring and ManagementVeeam ONEv9Veeam Management Pack for System CenterFree ToolsVeeam Backup Free EditionVeeam Endpoint Backup FREEVeeam ONE Free EditionVeeam FastSCP for Microsoft AzureOther Free ToolsAll Veeam Products Success StoriesHow to buyRenewalsSpecial OffersFindaResellerFind a Veeam Cloud & Service ProviderContact SalesJoin the Veeam Cloud & Service Provider ProgramProgram OverviewThe DRaaS OpportunityLaunch a Managed Backup ServiceCloud & Service Provider DirectoryFind a Veeam Cloud & Service ProviderCloud & Service Provider Success StoriesAlready a VCSP?Log in to VCSP PortalVCSP EnablementHow to buy Become a PartnerService ProviderResellerDistribut
Developer Within my Apache2 error.log file, i see several error messages like: [error] (9)Bad file descriptor: apr_socket_accept: (client socket) [error] (9)Bad file descriptor: apr_socket_accept: (client socket) [warn] long lost child came home! (pid 12345) [notice] Graceful restart requested, doing restart [error] (9)Bad file descriptor: apr_socket_accept: (client socket) (9)Bad file descriptor: apr_socket_accept: (client socket) The Bad file descriptor error message seems to appear everytime Apache restarts. Does anyone what this error message means? I had this problem in the past too and understand that it seams to be a bug in Apache2, but now i am not sure... Debian Etch/Apache 2.2.3. Can anyone tell me more about such an error end if possible how to ovoid it. Thanks in advance! Last edited: Sep 4, 2008 Hans, Sep 4, 2008 #1 falko Super Moderator ISPConfig Developer Have you tried to upgrade Debian's Apache package? falko, Sep 5, 2008 #2 Hans Moderator ISPConfig Developer falko said: ↑ Have you tried to upgrade Debian's Apache package?Click to expand... (I know it is not the latest Apache2 version available) but the latest Apache2 version wich comes with Etch is 2.2.3. And as you can see, all the packages are installed already: # apt-get install apache2 apache2-doc apache2-mpm-prefork apache2-utils libexpat1 ssl-cert Reading package lists... Done Building dependency tree... Done apache2 is already the newest version. apache2-doc is already the newest version. apache2-mpm-prefork is already the newest version. apache2-utils is already the newest version. libexpat1 is already the newest version. ssl-cert is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded. My system is up to date as i do an apt-get update/upgrade every single day. httpd -V also gives me:Apache 2.2.3 Last edited: Sep 6, 2008 Hans, Sep 5, 2008 #3 falko Super Moderator ISPConfig Developer Seems to be a problem with graceful restarts: http://www.linuxquestions.org/questions/linux-server-73/apache-bad-file-descriptor-593925/ https://issues.apache.org/bugzilla/show_bug.cgi?id=42829 Do you get the same error when you run a normal restart or a stop