Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7750525
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T11:18:51+00:00 2026-06-01T11:18:51+00:00

reply = redisCommand(rcontext,HGET %u %u,env->cr[3] ,KeyHandle); if(reply == NULL) { printf(in preNtDeletKey rediscommand error

  • 0
reply = redisCommand(rcontext,"HGET %u %u",env->cr[3] ,KeyHandle);
if(reply == NULL)
{
printf("in preNtDeletKey rediscommand error ! and the err type is %d the string is %s \n" ,rcontext->err,rcontext->errstr)";
}

Here I got a error , the reply return NULL
the output is

in preNtDeletKey rediscommand error ! and the err type is 1 the string is Interrupted system call

I use this in my project . And i grep in the hiredis source don’t find Interrupted system call
I want to know what the reason to cause a Interrupted system call
How hiredis write the string to the redisContext (because I don’t find in the sourec)

How we avoid the Interrupted system call ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T11:18:53+00:00Added an answer on June 1, 2026 at 11:18 am

    The hiredis package marshals your command using the Redis protocol, and sends it to the Redis server. It then synchronously waits for the reply.

    You will find the functions dealing with the sockets in the hiredis.c file:

    int redisBufferRead(redisContext *c)
    int redisBufferWrite(redisContext *c, int *done)
    

    In these functions, the EAGAIN error is handled, but not the EINTR error which corresponds to the “Interrupted system call” message.

    The consequence is any Unix signal, received by the process when hiredis is doing a write or (more likely) a read operation, can interrupt the operation and cause this error.

    You need first to understand which kind of signal the application receives. Depending on the nature of the signal and the application, there are various ways to handle this situation:

    • masking or deferring signal handlers before doing Redis calls
    • binding the signal to an event loop handler (if any) to avoid the signal to be processed when it is not expected
    • dedicate a given thread to handle all signals (and avoid any Redis calls in this thread)
    • using the SA_RESTART option (in sigaction) to tell the system to replay interrupted system calls automatically
    • just try to do the operation again (it might not be possible though)

    Personally, I would favor hiredis to handle the situation in a more graceful way (i.e. processing EINTR just like EAGAIN).

    UPDATE:

    The EAGAIN error is normally returned in two situations:

    • when the non blocking mode has been activated by calling redisConnectNonBlock or
      redisConnectUnixNonBlock()

    • when the connection is in blocking mode (default) and the redisSetTimeout() method has been called to set a timeout

    Please note calling the redisSetTimeout() functions on client side just set the SO_RCVTIMEO and SO_SNDTIMEO properties of the socket. It is completely unrelated to the timeout defined in the Redis configuration file which is a server side idle timeout (Redis server being able to close a connection if it has been inactive for more than N seconds).

    Getting EAGAIN in the second situation means the Redis instance is not responsive enough for the provided timeout. You may want to simply increase the timeout or investigate further the latency issues on Redis server side.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I saw this reply from Jon on Initialize generic object with unknown type :
Users can send a reply to feedback they received. Here is the form: <%=
i have this strange error : wait_fences: failed to receive reply: 10004003 in this
Related to this reply here . Locals' doc here. The docs mention that the
From one tutorials here: Post a reply on a comment in Facebook using cURL
Can someone check a xml reply string. User said it is not XML compatible
I am not able to reply to tweets usign twitter_oauth. Here is my code
Initiated by the reply . How can I use only Regex instead of wildcards?
I read your reply regarding the jQuery validator where you outline a method to
I received this reply on the Live555-mailing list: FEC is not needed for UDP.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.