cURL hangs the hook_user_update I am using a cURL to notify remote site of some updates on my site. I use it with 
hook_user_update()  which is used when user data is saved. Problem is that it takes a lot of time to do that (maybe slow remote server). User saving is slow and it takes sometimes a minute or two.

How could I make this work that cURL doesn't hang user update and they are not dependent in this way?

This is the code I am using now

/**
 * Implemention of hook_user_update(), Notify OS after updating user account
 */
function os_integration_user_update(&amp;$edit, $account, $category) {
  $query = array(
    'source' =&gt; 'web',
    'action' =&gt; 'nCustomer',
    'customer_id' =&gt; $account-&gt;uid,
    );

  $url = url('http://admin.com/synch/index.php', array('query' =&gt; $query));

$username = 'admin_os';
$password = 'admin_pass';
$basic = base64_encode($username . ':' . $password);

$headerArr = array();
$headerArr[] = 'Authorization: Basic ' . $basic;

$ch = curl_init( $url ) ; 
curl_setopt ($ch, CURLOPT_HTTPHEADER , $headerArr ); 
curl_setopt( $ch, CURLOPT_HEADER, 1);
// Execute
curl_exec($ch);

// Check if any error occurred
if(!curl_errno($ch))
{
 $info = curl_getinfo($ch);

 echo 'Took ' . $info['total_time'] . ' seconds to send a request to ' . $info['url'];
 watchdog('lelo_os_integration_os_error', 'Took ' . $info['total_time'] . ' seconds to send a request to ' . $info['url']);
 // other info data http://php.net/manual/en/function.curl-getinfo.php
}

// Close handle
curl_close($ch);
}
The HTTPRL project provides you with a non-blocking HTTP client. 

$url = url('http://admin.com/synch/index.php', array('query' =&gt; $query));
$username = 'admin_os';
$password = 'admin_pass';
$basic = base64_encode($username . ':' . $password);

httprl_request($url, array(
  'blocking' =&gt; FALSE,
  'headers' =&gt; array(
    'Authorization' =&gt; 'Basic '.$basic,
    'Host' =&gt; $_SERVER['HTTP_HOST']
   ),
));
$request = httprl_send_request();