<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html xmlns:fn="http://www.w3.org/2005/02/xpath-functions"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link rel="stylesheet" href="../../../../doc/otp_doc.css" type="text/css"> <title>Erlang -- erl_call</title> </head> <body bgcolor="white" text="#000000" link="#0000ff" vlink="#ff00ff" alink="#ff0000"><div id="container"> <script id="js" type="text/javascript" language="JavaScript" src="../../../../doc/js/flipmenu/flipmenu.js"></script><script id="js2" type="text/javascript" src="../../../../doc/js/erlresolvelinks.js"></script><script language="JavaScript" type="text/javascript"> <!-- function getWinHeight() { var myHeight = 0; if( typeof( window.innerHeight ) == 'number' ) { //Non-IE myHeight = window.innerHeight; } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { //IE 6+ in 'standards compliant mode' myHeight = document.documentElement.clientHeight; } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { //IE 4 compatible myHeight = document.body.clientHeight; } return myHeight; } function setscrollpos() { var objf=document.getElementById('loadscrollpos'); document.getElementById("leftnav").scrollTop = objf.offsetTop - getWinHeight()/2; } function addEvent(obj, evType, fn){ if (obj.addEventListener){ obj.addEventListener(evType, fn, true); return true; } else if (obj.attachEvent){ var r = obj.attachEvent("on"+evType, fn); return r; } else { return false; } } addEvent(window, 'load', setscrollpos); //--></script><div id="leftnav"><div class="innertube"> <img alt="Erlang logo" src="../../../../doc/erlang-logo.png"><br><small><a href="users_guide.html">User's Guide</a><br><a href="index.html">Reference Manual</a><br><a href="release_notes.html">Release Notes</a><br><a href="../pdf/erl_interface-3.7.5.pdf">PDF</a><br><a href="../../../../doc/index.html">Top</a></small><p><strong>Erlang Interface</strong><br><strong>Reference Manual</strong><br><small>Version 3.7.5</small></p> <br><a href="javascript:openAllFlips()">Expand All</a><br><a href="javascript:closeAllFlips()">Contract All</a><p><small><strong>Table of Contents</strong></small></p> <ul class="flipMenu"> <li id="no" title="ei " expanded="false">ei<ul> <li><a href="ei.html"> Top of manual page </a></li> <li title="ei_set_compat_rel"><a href="ei.html#ei_set_compat_rel">ei_set_compat_rel() </a></li> <li title="ei_encode_version"><a href="ei.html#ei_encode_version">ei_encode_version() </a></li> <li title="ei_x_encode_version"><a href="ei.html#ei_x_encode_version">ei_x_encode_version() </a></li> <li title="ei_encode_long"><a href="ei.html#ei_encode_long">ei_encode_long() </a></li> <li title="ei_x_encode_long"><a href="ei.html#ei_x_encode_long">ei_x_encode_long() </a></li> <li title="ei_encode_ulong"><a href="ei.html#ei_encode_ulong">ei_encode_ulong() </a></li> <li title="ei_x_encode_ulong"><a href="ei.html#ei_x_encode_ulong">ei_x_encode_ulong() </a></li> <li title="ei_encode_longlong"><a href="ei.html#ei_encode_longlong">ei_encode_longlong() </a></li> <li title="ei_x_encode_longlong"><a href="ei.html#ei_x_encode_longlong">ei_x_encode_longlong() </a></li> <li title="ei_encode_ulonglong"><a href="ei.html#ei_encode_ulonglong">ei_encode_ulonglong() </a></li> <li title="ei_x_encode_ulonglong"><a href="ei.html#ei_x_encode_ulonglong">ei_x_encode_ulonglong() </a></li> <li title="ei_encode_bignum"><a href="ei.html#ei_encode_bignum">ei_encode_bignum() </a></li> <li title="ei_x_encode_bignum"><a href="ei.html#ei_x_encode_bignum">ei_x_encode_bignum() </a></li> <li title="ei_encode_double"><a href="ei.html#ei_encode_double">ei_encode_double() </a></li> <li title="ei_x_encode_double"><a href="ei.html#ei_x_encode_double">ei_x_encode_double() </a></li> <li title="ei_encode_boolean"><a href="ei.html#ei_encode_boolean">ei_encode_boolean() </a></li> <li title="ei_x_encode_boolean"><a href="ei.html#ei_x_encode_boolean">ei_x_encode_boolean() </a></li> <li title="ei_encode_char"><a href="ei.html#ei_encode_char">ei_encode_char() </a></li> <li title="ei_x_encode_char"><a href="ei.html#ei_x_encode_char">ei_x_encode_char() </a></li> <li title="ei_encode_string"><a href="ei.html#ei_encode_string">ei_encode_string() </a></li> <li title="ei_encode_string_len"><a href="ei.html#ei_encode_string_len">ei_encode_string_len() </a></li> <li title="ei_x_encode_string"><a href="ei.html#ei_x_encode_string">ei_x_encode_string() </a></li> <li title="ei_x_encode_string_len"><a href="ei.html#ei_x_encode_string_len">ei_x_encode_string_len() </a></li> <li title="ei_encode_atom"><a href="ei.html#ei_encode_atom">ei_encode_atom() </a></li> <li title="ei_encode_atom_len"><a href="ei.html#ei_encode_atom_len">ei_encode_atom_len() </a></li> <li title="ei_x_encode_atom"><a href="ei.html#ei_x_encode_atom">ei_x_encode_atom() </a></li> <li title="ei_x_encode_atom_len"><a href="ei.html#ei_x_encode_atom_len">ei_x_encode_atom_len() </a></li> <li title="ei_encode_binary"><a href="ei.html#ei_encode_binary">ei_encode_binary() </a></li> <li title="ei_x_encode_binary"><a href="ei.html#ei_x_encode_binary">ei_x_encode_binary() </a></li> <li title="ei_encode_pid"><a href="ei.html#ei_encode_pid">ei_encode_pid() </a></li> <li title="ei_x_encode_pid"><a href="ei.html#ei_x_encode_pid">ei_x_encode_pid() </a></li> <li title="ei_encode_fun"><a href="ei.html#ei_encode_fun">ei_encode_fun() </a></li> <li title="ei_x_encode_fun"><a href="ei.html#ei_x_encode_fun">ei_x_encode_fun() </a></li> <li title="ei_encode_port"><a href="ei.html#ei_encode_port">ei_encode_port() </a></li> <li title="ei_x_encode_port"><a href="ei.html#ei_x_encode_port">ei_x_encode_port() </a></li> <li title="ei_encode_ref"><a href="ei.html#ei_encode_ref">ei_encode_ref() </a></li> <li title="ei_x_encode_ref"><a href="ei.html#ei_x_encode_ref">ei_x_encode_ref() </a></li> <li title="ei_encode_term"><a href="ei.html#ei_encode_term">ei_encode_term() </a></li> <li title="ei_x_encode_term"><a href="ei.html#ei_x_encode_term">ei_x_encode_term() </a></li> <li title="ei_encode_trace"><a href="ei.html#ei_encode_trace">ei_encode_trace() </a></li> <li title="ei_x_encode_trace"><a href="ei.html#ei_x_encode_trace">ei_x_encode_trace() </a></li> <li title="ei_encode_tuple_header"><a href="ei.html#ei_encode_tuple_header">ei_encode_tuple_header() </a></li> <li title="ei_x_encode_tuple_header"><a href="ei.html#ei_x_encode_tuple_header">ei_x_encode_tuple_header() </a></li> <li title="ei_encode_list_header"><a href="ei.html#ei_encode_list_header">ei_encode_list_header() </a></li> <li title="ei_x_encode_list_header"><a href="ei.html#ei_x_encode_list_header">ei_x_encode_list_header() </a></li> <li title="ei_encode_empty_list"><a href="ei.html#ei_encode_empty_list">ei_encode_empty_list() </a></li> <li title="ei_x_encode_empty_list"><a href="ei.html#ei_x_encode_empty_list">ei_x_encode_empty_list() </a></li> <li title="ei_get_type"><a href="ei.html#ei_get_type">ei_get_type() </a></li> <li title="ei_decode_version"><a href="ei.html#ei_decode_version">ei_decode_version() </a></li> <li title="ei_decode_long"><a href="ei.html#ei_decode_long">ei_decode_long() </a></li> <li title="ei_decode_ulong"><a href="ei.html#ei_decode_ulong">ei_decode_ulong() </a></li> <li title="ei_decode_longlong"><a href="ei.html#ei_decode_longlong">ei_decode_longlong() </a></li> <li title="ei_decode_ulonglong"><a href="ei.html#ei_decode_ulonglong">ei_decode_ulonglong() </a></li> <li title="ei_decode_bignum"><a href="ei.html#ei_decode_bignum">ei_decode_bignum() </a></li> <li title="ei_decode_double"><a href="ei.html#ei_decode_double">ei_decode_double() </a></li> <li title="ei_decode_boolean"><a href="ei.html#ei_decode_boolean">ei_decode_boolean() </a></li> <li title="ei_decode_char"><a href="ei.html#ei_decode_char">ei_decode_char() </a></li> <li title="ei_decode_string"><a href="ei.html#ei_decode_string">ei_decode_string() </a></li> <li title="ei_decode_atom"><a href="ei.html#ei_decode_atom">ei_decode_atom() </a></li> <li title="ei_decode_binary"><a href="ei.html#ei_decode_binary">ei_decode_binary() </a></li> <li title="ei_decode_fun"><a href="ei.html#ei_decode_fun">ei_decode_fun() </a></li> <li title="free_fun"><a href="ei.html#free_fun">free_fun() </a></li> <li title="ei_decode_pid"><a href="ei.html#ei_decode_pid">ei_decode_pid() </a></li> <li title="ei_decode_port"><a href="ei.html#ei_decode_port">ei_decode_port() </a></li> <li title="ei_decode_ref"><a href="ei.html#ei_decode_ref">ei_decode_ref() </a></li> <li title="ei_decode_trace"><a href="ei.html#ei_decode_trace">ei_decode_trace() </a></li> <li title="ei_decode_tuple_header"><a href="ei.html#ei_decode_tuple_header">ei_decode_tuple_header() </a></li> <li title="ei_decode_list_header"><a href="ei.html#ei_decode_list_header">ei_decode_list_header() </a></li> <li title="ei_decode_ei_term"><a href="ei.html#ei_decode_ei_term">ei_decode_ei_term() </a></li> <li title="ei_decode_term"><a href="ei.html#ei_decode_term">ei_decode_term() </a></li> <li title="ei_print_term"><a href="ei.html#ei_print_term">ei_print_term() </a></li> <li title="ei_s_print_term"><a href="ei.html#ei_s_print_term">ei_s_print_term() </a></li> <li title="ei_x_format"><a href="ei.html#ei_x_format">ei_x_format() </a></li> <li title="ei_x_format_wo_ver"><a href="ei.html#ei_x_format_wo_ver">ei_x_format_wo_ver() </a></li> <li title="ei_x_new"><a href="ei.html#ei_x_new">ei_x_new() </a></li> <li title="ei_x_new_with_version"><a href="ei.html#ei_x_new_with_version">ei_x_new_with_version() </a></li> <li title="ei_x_free"><a href="ei.html#ei_x_free">ei_x_free() </a></li> <li title="ei_x_append"><a href="ei.html#ei_x_append">ei_x_append() </a></li> <li title="ei_x_append_buf"><a href="ei.html#ei_x_append_buf">ei_x_append_buf() </a></li> <li title="ei_skip_term"><a href="ei.html#ei_skip_term">ei_skip_term() </a></li> </ul> </li> <li id="no" title="ei_connect " expanded="false">ei_connect<ul> <li><a href="ei_connect.html"> Top of manual page </a></li> <li title="ei_connect_init"><a href="ei_connect.html#ei_connect_init">ei_connect_init() </a></li> <li title="ei_connect_xinit"><a href="ei_connect.html#ei_connect_xinit">ei_connect_xinit() </a></li> <li title="ei_connect"><a href="ei_connect.html#ei_connect">ei_connect() </a></li> <li title="ei_xconnect"><a href="ei_connect.html#ei_xconnect">ei_xconnect() </a></li> <li title="ei_connect_tmo"><a href="ei_connect.html#ei_connect_tmo">ei_connect_tmo() </a></li> <li title="ei_xconnect_tmo"><a href="ei_connect.html#ei_xconnect_tmo">ei_xconnect_tmo() </a></li> <li title="ei_receive"><a href="ei_connect.html#ei_receive">ei_receive() </a></li> <li title="ei_receive_tmo"><a href="ei_connect.html#ei_receive_tmo">ei_receive_tmo() </a></li> <li title="ei_receive_msg"><a href="ei_connect.html#ei_receive_msg">ei_receive_msg() </a></li> <li title="ei_xreceive_msg"><a href="ei_connect.html#ei_xreceive_msg">ei_xreceive_msg() </a></li> <li title="ei_receive_msg_tmo"><a href="ei_connect.html#ei_receive_msg_tmo">ei_receive_msg_tmo() </a></li> <li title="ei_xreceive_msg_tmo"><a href="ei_connect.html#ei_xreceive_msg_tmo">ei_xreceive_msg_tmo() </a></li> <li title="ei_receive_encoded"><a href="ei_connect.html#ei_receive_encoded">ei_receive_encoded() </a></li> <li title="ei_receive_encoded_tmo"><a href="ei_connect.html#ei_receive_encoded_tmo">ei_receive_encoded_tmo() </a></li> <li title="ei_send"><a href="ei_connect.html#ei_send">ei_send() </a></li> <li title="ei_send_tmo"><a href="ei_connect.html#ei_send_tmo">ei_send_tmo() </a></li> <li title="ei_send_encoded"><a href="ei_connect.html#ei_send_encoded">ei_send_encoded() </a></li> <li title="ei_send_encoded_tmo"><a href="ei_connect.html#ei_send_encoded_tmo">ei_send_encoded_tmo() </a></li> <li title="ei_reg_send"><a href="ei_connect.html#ei_reg_send">ei_reg_send() </a></li> <li title="ei_reg_send_tmo"><a href="ei_connect.html#ei_reg_send_tmo">ei_reg_send_tmo() </a></li> <li title="ei_send_reg_encoded"><a href="ei_connect.html#ei_send_reg_encoded">ei_send_reg_encoded() </a></li> <li title="ei_send_reg_encoded_tmo"><a href="ei_connect.html#ei_send_reg_encoded_tmo">ei_send_reg_encoded_tmo() </a></li> <li title="ei_rpc"><a href="ei_connect.html#ei_rpc">ei_rpc() </a></li> <li title="ei_rpc_to"><a href="ei_connect.html#ei_rpc_to">ei_rpc_to() </a></li> <li title="ei_rpc_from"><a href="ei_connect.html#ei_rpc_from">ei_rpc_from() </a></li> <li title="ei_publish"><a href="ei_connect.html#ei_publish">ei_publish() </a></li> <li title="ei_publish_tmo"><a href="ei_connect.html#ei_publish_tmo">ei_publish_tmo() </a></li> <li title="ei_accept"><a href="ei_connect.html#ei_accept">ei_accept() </a></li> <li title="ei_accept_tmo"><a href="ei_connect.html#ei_accept_tmo">ei_accept_tmo() </a></li> <li title="ei_unpublish"><a href="ei_connect.html#ei_unpublish">ei_unpublish() </a></li> <li title="ei_unpublish_tmo"><a href="ei_connect.html#ei_unpublish_tmo">ei_unpublish_tmo() </a></li> <li title="ei_thisnodename"><a href="ei_connect.html#ei_thisnodename">ei_thisnodename() </a></li> <li title="ei_thishostname"><a href="ei_connect.html#ei_thishostname">ei_thishostname() </a></li> <li title="ei_thisalivename"><a href="ei_connect.html#ei_thisalivename">ei_thisalivename() </a></li> <li title="ei_self"><a href="ei_connect.html#ei_self">ei_self() </a></li> <li title="*ei_gethostbyname"><a href="ei_connect.html#*ei_gethostbyname">*ei_gethostbyname() </a></li> <li title="*ei_gethostbyaddr"><a href="ei_connect.html#*ei_gethostbyaddr">*ei_gethostbyaddr() </a></li> <li title="*ei_gethostbyname_r"><a href="ei_connect.html#*ei_gethostbyname_r">*ei_gethostbyname_r() </a></li> <li title="*ei_gethostbyaddr_r"><a href="ei_connect.html#*ei_gethostbyaddr_r">*ei_gethostbyaddr_r() </a></li> <li title="ei_get_tracelevel"><a href="ei_connect.html#ei_get_tracelevel">ei_get_tracelevel() </a></li> <li title="ei_set_tracelevel"><a href="ei_connect.html#ei_set_tracelevel">ei_set_tracelevel() </a></li> </ul> </li> <li id="no" title="registry " expanded="false">registry<ul> <li><a href="registry.html"> Top of manual page </a></li> <li title="ei_reg_open"><a href="registry.html#ei_reg_open">ei_reg_open() </a></li> <li title="ei_reg_resize"><a href="registry.html#ei_reg_resize">ei_reg_resize() </a></li> <li title="ei_reg_close"><a href="registry.html#ei_reg_close">ei_reg_close() </a></li> <li title="ei_reg_setival"><a href="registry.html#ei_reg_setival">ei_reg_setival() </a></li> <li title="ei_reg_setfval"><a href="registry.html#ei_reg_setfval">ei_reg_setfval() </a></li> <li title="ei_reg_setsval"><a href="registry.html#ei_reg_setsval">ei_reg_setsval() </a></li> <li title="ei_reg_setpval"><a href="registry.html#ei_reg_setpval">ei_reg_setpval() </a></li> <li title="ei_reg_setval"><a href="registry.html#ei_reg_setval">ei_reg_setval() </a></li> <li title="ei_reg_getival"><a href="registry.html#ei_reg_getival">ei_reg_getival() </a></li> <li title="ei_reg_getfval"><a href="registry.html#ei_reg_getfval">ei_reg_getfval() </a></li> <li title="ei_reg_getsval"><a href="registry.html#ei_reg_getsval">ei_reg_getsval() </a></li> <li title="ei_reg_getpval"><a href="registry.html#ei_reg_getpval">ei_reg_getpval() </a></li> <li title="ei_reg_getval"><a href="registry.html#ei_reg_getval">ei_reg_getval() </a></li> <li title="ei_reg_markdirty"><a href="registry.html#ei_reg_markdirty">ei_reg_markdirty() </a></li> <li title="ei_reg_delete"><a href="registry.html#ei_reg_delete">ei_reg_delete() </a></li> <li title="ei_reg_stat"><a href="registry.html#ei_reg_stat">ei_reg_stat() </a></li> <li title="ei_reg_tabstat"><a href="registry.html#ei_reg_tabstat">ei_reg_tabstat() </a></li> <li title="ei_reg_dump"><a href="registry.html#ei_reg_dump">ei_reg_dump() </a></li> <li title="ei_reg_restore"><a href="registry.html#ei_reg_restore">ei_reg_restore() </a></li> <li title="ei_reg_purge"><a href="registry.html#ei_reg_purge">ei_reg_purge() </a></li> </ul> </li> <li id="no" title="erl_connect " expanded="false">erl_connect<ul> <li><a href="erl_connect.html"> Top of manual page </a></li> <li title="erl_connect_init"><a href="erl_connect.html#erl_connect_init">erl_connect_init() </a></li> <li title="erl_connect_xinit"><a href="erl_connect.html#erl_connect_xinit">erl_connect_xinit() </a></li> <li title="erl_connect"><a href="erl_connect.html#erl_connect">erl_connect() </a></li> <li title="erl_xconnect"><a href="erl_connect.html#erl_xconnect">erl_xconnect() </a></li> <li title="erl_close_connection"><a href="erl_connect.html#erl_close_connection">erl_close_connection() </a></li> <li title="erl_receive"><a href="erl_connect.html#erl_receive">erl_receive() </a></li> <li title="erl_receive_msg"><a href="erl_connect.html#erl_receive_msg">erl_receive_msg() </a></li> <li title="erl_xreceive_msg"><a href="erl_connect.html#erl_xreceive_msg">erl_xreceive_msg() </a></li> <li title="erl_send"><a href="erl_connect.html#erl_send">erl_send() </a></li> <li title="erl_reg_send"><a href="erl_connect.html#erl_reg_send">erl_reg_send() </a></li> <li title="erl_rpc"><a href="erl_connect.html#erl_rpc">erl_rpc() </a></li> <li title="erl_rpc_to"><a href="erl_connect.html#erl_rpc_to">erl_rpc_to() </a></li> <li title="erl_rpc_from"><a href="erl_connect.html#erl_rpc_from">erl_rpc_from() </a></li> <li title="erl_publish"><a href="erl_connect.html#erl_publish">erl_publish() </a></li> <li title="erl_accept"><a href="erl_connect.html#erl_accept">erl_accept() </a></li> <li title="erl_thiscookie"><a href="erl_connect.html#erl_thiscookie">erl_thiscookie() </a></li> <li title="erl_thisnodename"><a href="erl_connect.html#erl_thisnodename">erl_thisnodename() </a></li> <li title="erl_thishostname"><a href="erl_connect.html#erl_thishostname">erl_thishostname() </a></li> <li title="erl_thisalivename"><a href="erl_connect.html#erl_thisalivename">erl_thisalivename() </a></li> <li title="erl_thiscreation"><a href="erl_connect.html#erl_thiscreation">erl_thiscreation() </a></li> <li title="erl_unpublish"><a href="erl_connect.html#erl_unpublish">erl_unpublish() </a></li> <li title="*erl_gethostbyname"><a href="erl_connect.html#*erl_gethostbyname">*erl_gethostbyname() </a></li> <li title="*erl_gethostbyaddr"><a href="erl_connect.html#*erl_gethostbyaddr">*erl_gethostbyaddr() </a></li> <li title="*erl_gethostbyname_r"><a href="erl_connect.html#*erl_gethostbyname_r">*erl_gethostbyname_r() </a></li> <li title="*erl_gethostbyaddr_r"><a href="erl_connect.html#*erl_gethostbyaddr_r">*erl_gethostbyaddr_r() </a></li> </ul> </li> <li id="no" title="erl_error " expanded="false">erl_error<ul> <li><a href="erl_error.html"> Top of manual page </a></li> <li title="erl_err_msg"><a href="erl_error.html#erl_err_msg">erl_err_msg() </a></li> <li title="erl_err_quit"><a href="erl_error.html#erl_err_quit">erl_err_quit() </a></li> <li title="erl_err_ret"><a href="erl_error.html#erl_err_ret">erl_err_ret() </a></li> <li title="erl_err_sys"><a href="erl_error.html#erl_err_sys">erl_err_sys() </a></li> <li title=""><a href="erl_error.html#">erl_errno() </a></li> </ul> </li> <li id="no" title="erl_eterm " expanded="false">erl_eterm<ul> <li><a href="erl_eterm.html"> Top of manual page </a></li> <li title="erl_cons"><a href="erl_eterm.html#erl_cons">erl_cons() </a></li> <li title="erl_copy_term"><a href="erl_eterm.html#erl_copy_term">erl_copy_term() </a></li> <li title="erl_element"><a href="erl_eterm.html#erl_element">erl_element() </a></li> <li title="erl_init"><a href="erl_eterm.html#erl_init">erl_init() </a></li> <li title="erl_hd"><a href="erl_eterm.html#erl_hd">erl_hd() </a></li> <li title="erl_iolist_to_binary"><a href="erl_eterm.html#erl_iolist_to_binary">erl_iolist_to_binary() </a></li> <li title="erl_iolist_to_string"><a href="erl_eterm.html#erl_iolist_to_string">erl_iolist_to_string() </a></li> <li title="erl_iolist_length"><a href="erl_eterm.html#erl_iolist_length">erl_iolist_length() </a></li> <li title="erl_length"><a href="erl_eterm.html#erl_length">erl_length() </a></li> <li title="erl_mk_atom"><a href="erl_eterm.html#erl_mk_atom">erl_mk_atom() </a></li> <li title="erl_mk_binary"><a href="erl_eterm.html#erl_mk_binary">erl_mk_binary() </a></li> <li title="erl_mk_empty_list"><a href="erl_eterm.html#erl_mk_empty_list">erl_mk_empty_list() </a></li> <li title="erl_mk_estring"><a href="erl_eterm.html#erl_mk_estring">erl_mk_estring() </a></li> <li title="erl_mk_float"><a href="erl_eterm.html#erl_mk_float">erl_mk_float() </a></li> <li title="erl_mk_int"><a href="erl_eterm.html#erl_mk_int">erl_mk_int() </a></li> <li title="erl_mk_list"><a href="erl_eterm.html#erl_mk_list">erl_mk_list() </a></li> <li title="erl_mk_pid"><a href="erl_eterm.html#erl_mk_pid">erl_mk_pid() </a></li> <li title="erl_mk_port"><a href="erl_eterm.html#erl_mk_port">erl_mk_port() </a></li> <li title="erl_mk_ref"><a href="erl_eterm.html#erl_mk_ref">erl_mk_ref() </a></li> <li title="erl_mk_long_ref"><a href="erl_eterm.html#erl_mk_long_ref">erl_mk_long_ref() </a></li> <li title="erl_mk_string"><a href="erl_eterm.html#erl_mk_string">erl_mk_string() </a></li> <li title="erl_mk_tuple"><a href="erl_eterm.html#erl_mk_tuple">erl_mk_tuple() </a></li> <li title="erl_mk_uint"><a href="erl_eterm.html#erl_mk_uint">erl_mk_uint() </a></li> <li title="erl_mk_var"><a href="erl_eterm.html#erl_mk_var">erl_mk_var() </a></li> <li title="erl_print_term"><a href="erl_eterm.html#erl_print_term">erl_print_term() </a></li> <li title="erl_set_compat_rel"><a href="erl_eterm.html#erl_set_compat_rel">erl_set_compat_rel() </a></li> <li title="erl_size"><a href="erl_eterm.html#erl_size">erl_size() </a></li> <li title="erl_tl"><a href="erl_eterm.html#erl_tl">erl_tl() </a></li> <li title="erl_var_content"><a href="erl_eterm.html#erl_var_content">erl_var_content() </a></li> </ul> </li> <li id="no" title="erl_format " expanded="false">erl_format<ul> <li><a href="erl_format.html"> Top of manual page </a></li> <li title="erl_format"><a href="erl_format.html#erl_format">erl_format() </a></li> <li title="erl_match"><a href="erl_format.html#erl_match">erl_match() </a></li> </ul> </li> <li id="no" title="erl_global " expanded="false">erl_global<ul> <li><a href="erl_global.html"> Top of manual page </a></li> <li title="erl_global_names"><a href="erl_global.html#erl_global_names">erl_global_names() </a></li> <li title="erl_global_register"><a href="erl_global.html#erl_global_register">erl_global_register() </a></li> <li title="erl_global_unregister"><a href="erl_global.html#erl_global_unregister">erl_global_unregister() </a></li> <li title="erl_global_whereis"><a href="erl_global.html#erl_global_whereis">erl_global_whereis() </a></li> </ul> </li> <li id="no" title="erl_malloc " expanded="false">erl_malloc<ul> <li><a href="erl_malloc.html"> Top of manual page </a></li> <li title="erl_alloc_eterm"><a href="erl_malloc.html#erl_alloc_eterm">erl_alloc_eterm() </a></li> <li title="erl_eterm_release"><a href="erl_malloc.html#erl_eterm_release">erl_eterm_release() </a></li> <li title="erl_eterm_statistics"><a href="erl_malloc.html#erl_eterm_statistics">erl_eterm_statistics() </a></li> <li title="erl_free_array"><a href="erl_malloc.html#erl_free_array">erl_free_array() </a></li> <li title="erl_free_term"><a href="erl_malloc.html#erl_free_term">erl_free_term() </a></li> <li title="erl_free_compound"><a href="erl_malloc.html#erl_free_compound">erl_free_compound() </a></li> <li title="erl_malloc"><a href="erl_malloc.html#erl_malloc">erl_malloc() </a></li> <li title="erl_free"><a href="erl_malloc.html#erl_free">erl_free() </a></li> </ul> </li> <li id="no" title="erl_marshal " expanded="false">erl_marshal<ul> <li><a href="erl_marshal.html"> Top of manual page </a></li> <li title="erl_compare_ext"><a href="erl_marshal.html#erl_compare_ext">erl_compare_ext() </a></li> <li title="erl_decode"><a href="erl_marshal.html#erl_decode">erl_decode() </a></li> <li title="erl_decode_buf"><a href="erl_marshal.html#erl_decode_buf">erl_decode_buf() </a></li> <li title="erl_encode"><a href="erl_marshal.html#erl_encode">erl_encode() </a></li> <li title="erl_encode_buf"><a href="erl_marshal.html#erl_encode_buf">erl_encode_buf() </a></li> <li title="erl_ext_size"><a href="erl_marshal.html#erl_ext_size">erl_ext_size() </a></li> <li title="erl_ext_type"><a href="erl_marshal.html#erl_ext_type">erl_ext_type() </a></li> <li title="erl_peek_ext"><a href="erl_marshal.html#erl_peek_ext">erl_peek_ext() </a></li> <li title="erl_term_len"><a href="erl_marshal.html#erl_term_len">erl_term_len() </a></li> </ul> </li> <li title="erl_call"><a href="erl_call.html">erl_call</a></li> </ul> </div></div> <div id="content"> <div class="innertube"> <!-- refpage --><center><h1>erl_call</h1></center> <h3>COMMAND</h3> <div class="REFBODY">erl_call</div> <h3>COMMAND SUMMARY</h3> <div class="REFBODY">Call/Start a Distributed Erlang Node</div> <h3>DESCRIPTION</h3> <div class="REFBODY"><p> <p><span class="code">erl_call</span> makes it possible to start and/or communicate with a distributed Erlang node. It is built upon the <span class="code">erl_interface</span> library as an example application. Its purpose is to use an Unix shell script to interact with a distributed Erlang node. It performs all communication with the Erlang <strong>rex server</strong>, using the standard Erlang RPC facility. It does not require any special software to be run at the Erlang target node.</p> <p>The main use is to either start a distributed Erlang node or to make an ordinary function call. However, it is also possible to pipe an Erlang module to <span class="code">erl_call</span> and have it compiled, or to pipe a sequence of Erlang expressions to be evaluated (similar to the Erlang shell).</p> <p>Options, which cause <span class="code">stdin</span> to be read, can be used with advantage as scripts from within (Unix) shell scripts. Another nice use of <span class="code">erl_call</span> could be from (http) CGI-bin scripts.</p> </p></div> <h3>EXPORTS</h3> <p><span class="bold_code">erl_call <options></span></p> <div class="REFBODY"><p> <p>Each option flag is described below with its name, type and meaning. </p> <dl> <dt><strong>-a [Mod [Fun [Args]]]]</strong></dt> <dd> <p>(<strong>optional</strong>): Applies the specified function and returns the result. <span class="code">Mod</span> must be specified, however <span class="code">start</span> and <span class="code">[]</span> are assumed for unspecified <span class="code">Fun</span> and <span class="code">Args</span>, respectively. <span class="code">Args</span> should be in the same format as for <span class="code">erlang:apply/3</span>. Note that this flag takes exactly one argument, so quoting may be necessary in order to group <span class="code">Mod</span>, <span class="code">Fun</span> and <span class="code">Args</span>, in a manner dependent on the behavior of your command shell.</p> <p></p> </dd> <dt><strong>-c Cookie</strong></dt> <dd> <p>(<strong>optional</strong>): Use this option to specify a certain cookie. If no cookie is specified, the <span class="code">~/.erlang.cookie</span> file is read and its content are used as cookie. The Erlang node we want to communicate with must have the same cookie.</p> </dd> <dt><strong>-d</strong></dt> <dd> <p>(<strong>optional</strong>): Debug mode. This causes all IO to be output to the file <span class="code">~/.erl_call.out.Nodename</span>, where <span class="code">Nodename</span> is the node name of the Erlang node in question.</p> <p></p> </dd> <dt><strong>-e</strong></dt> <dd> <p>(<strong>optional</strong>): Reads a sequence of Erlang expressions, separated by '<strong>,</strong>' and ended with a '<strong>.</strong>', from <span class="code">stdin</span> until EOF (Control-D). Evaluates the expressions and returns the result from the last expression. Returns <span class="code">{ok,Result}</span> if successful.</p> <p></p> </dd> <dt><strong>-h HiddenName</strong></dt> <dd> <p>(<strong>optional</strong>): Specifies the name of the hidden node that <span class="code">erl_call</span> represents.</p> <p></p> </dd> <dt><strong>-m</strong></dt> <dd> <p>(<strong>optional</strong>): Reads an Erlang module from <span class="code">stdin</span> and compiles it.</p> <p></p> </dd> <dt><strong>-n Node</strong></dt> <dd> <p>(one of <span class="code">-n, -name, -sname</span> is required): Has the same meaning as <span class="code">-name</span> and can still be used for backwards compatibility reasons.</p> <p></p> </dd> <dt><strong>-name Node</strong></dt> <dd> <p>(one of <span class="code">-n, -name, -sname</span> is required): <span class="code">Node</span> is the name of the node to be started or communicated with. It is assumed that <span class="code">Node</span> is started with <span class="code">erl -name</span>, which means that fully qualified long node names are used. If the <span class="code">-s</span> option is given, an Erlang node will (if necessary) be started with <span class="code">erl -name</span>.</p> <p></p> </dd> <dt><strong>-q</strong></dt> <dd> <p>(<strong>optional</strong>): Halts the Erlang node specified with the -n switch. This switch overrides the -s switch.</p> <p></p> </dd> <dt><strong>-r</strong></dt> <dd> <p>(<strong>optional</strong>): Generates a random name of the hidden node that <span class="code">erl_call</span> represents.</p> <p></p> </dd> <dt><strong>-s</strong></dt> <dd> <p>(<strong>optional</strong>): Starts a distributed Erlang node if necessary. This means that in a sequence of calls, where the '<span class="code">-s</span>' and '<span class="code">-n Node</span>' are constant, only the first call will start the Erlang node. This makes the rest of the communication very fast. This flag is currently only available on the Unix platform.</p> <p></p> </dd> <dt><strong>-sname Node</strong></dt> <dd> <p>(one of <span class="code">-n, -name, -sname</span> is required): <span class="code">Node</span> is the name of the node to be started or communicated with. It is assumed that <span class="code">Node</span> is started with <span class="code">erl -sname</span> which means that short node names are used. If <span class="code">-s</span> option is given, an Erlang node will be started (if necessary) with <span class="code">erl -sname</span>.</p> <p></p> </dd> <dt><strong>-v</strong></dt> <dd> <p>(<strong>optional</strong>): Prints a lot of <span class="code">verbose</span> information. This is only useful for the developer and maintainer of <span class="code">erl_call</span>.</p> <p></p> </dd> <dt><strong>-x ErlScript</strong></dt> <dd> <p>(<strong>optional</strong>): Specifies another name of the Erlang start-up script to be used. If not specified, the standard <span class="code">erl</span> start-up script is used.</p> </dd> </dl> </p></div> <h3><a name="id342967">Examples</a></h3> <div class="REFBODY"> <p>Starts an Erlang node and calls <span class="code">erlang:time/0</span>.</p> <div class="example"><pre> erl_call -s -a 'erlang time' -n madonna {18,27,34} </pre></div> <p>Terminates an Erlang node by calling <span class="code">erlang:halt/0</span>.</p> <div class="example"><pre> erl_call -s -a 'erlang halt' -n madonna </pre></div> <p>An apply with several arguments.</p> <div class="example"><pre> erl_call -s -a 'lists map [{math,sqrt},[1,4,9,16,25]]' -n madonna </pre></div> <p>Evaluates a couple of expressions. <strong>The input ends with EOF (Control-D)</strong>.</p> <div class="example"><pre> erl_call -s -e -n madonna statistics(runtime), X=1, Y=2, {_,T}=statistics(runtime), {X+Y,T}. ^D {ok,{3,0}} </pre></div> <p>Compiles a module and runs it. <strong>Again, the input ends with EOF (Control-D)</strong>. (In the example shown, the output has been formatted afterwards).</p> <div class="example"><pre> erl_call -s -m -a lolita -n madonna -module(lolita). -compile(export_all). start() -> P = processes(), F = fun(X) -> {X,process_info(X,registered_name)} end, lists:map(F,[],P). ^D [{<madonna@chivas.du.etx.ericsson.se,0,0>, {registered_name,init}}, {<madonna@chivas.du.etx.ericsson.se,2,0>, {registered_name,erl_prim_loader}}, {<madonna@chivas.du.etx.ericsson.se,4,0>, {registered_name,error_logger}}, {<madonna@chivas.du.etx.ericsson.se,5,0>, {registered_name,application_controller}}, {<madonna@chivas.du.etx.ericsson.se,6,0>, {registered_name,kernel}}, {<madonna@chivas.du.etx.ericsson.se,7,0>, []}, {<madonna@chivas.du.etx.ericsson.se,8,0>, {registered_name,kernel_sup}}, {<madonna@chivas.du.etx.ericsson.se,9,0>, {registered_name,net_sup}}, {<madonna@chivas.du.etx.ericsson.se,10,0>, {registered_name,net_kernel}}, {<madonna@chivas.du.etx.ericsson.se,11,0>, []}, {<madonna@chivas.du.etx.ericsson.se,12,0>, {registered_name,global_name_server}}, {<madonna@chivas.du.etx.ericsson.se,13,0>, {registered_name,auth}}, {<madonna@chivas.du.etx.ericsson.se,14,0>, {registered_name,rex}}, {<madonna@chivas.du.etx.ericsson.se,15,0>, []}, {<madonna@chivas.du.etx.ericsson.se,16,0>, {registered_name,file_server}}, {<madonna@chivas.du.etx.ericsson.se,17,0>, {registered_name,code_server}}, {<madonna@chivas.du.etx.ericsson.se,20,0>, {registered_name,user}}, {<madonna@chivas.du.etx.ericsson.se,38,0>, []}] </pre></div> </div> </div> <div class="footer"> <hr> <p>Copyright © 1998-2011 Ericsson AB. All Rights Reserved.</p> </div> </div> </div></body> </html>