From bcf3b3d0d589666575d9b044d0779be2e40e1762 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Holger=20Wei=C3=9F?= Date: Wed, 10 Nov 2010 23:03:44 +0100 Subject: Allow user to specify the IP address epmd binds to The IP address(es) epmd binds to can now be specified by the user, either via epmd's new "-address" option or (if that's not used) by setting the environment variable ERL_EPMD_ADDRESS. Multiple addresses may be specified using a comma-separated list. If the loopback address is not in this list, it will be added implicitly, so that the daemon can be queried by an interactive epmd process. --- erts/doc/src/epmd.xml | 19 +++++++++++++++++++ erts/doc/src/erl.xml | 9 +++++++++ 2 files changed, 28 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/epmd.xml b/erts/doc/src/epmd.xml index f01cf90a36..f2ea325be7 100644 --- a/erts/doc/src/epmd.xml +++ b/erts/doc/src/epmd.xml @@ -116,6 +116,16 @@

These options are available when starting the actual name server. The name server is normally started automatically by the erl command (if not already available), but it can also be started at i.e. system start-up.

+ + +

Let this instance of epmd listen only on the + comma-separated list of IP addresses and on the loopback address + (which is implicitely added to the list if it has not been + specified). This can also be set using the + environment variable, see the + section Environment + variables below.

+

Let this instance of epmd listen to another TCP port than @@ -228,6 +238,15 @@ Environment variables + + +

This environment variable may be set to a comma-separated + list of IP addresses, in which case the epmd daemon + will listen only on the specified address(es) and on the + loopback address (which is implicitely added to the list if it + has not been specified). The default behaviour is to listen on + all available IP addresses.

+

This environment variable can contain the port number epmd will use. diff --git a/erts/doc/src/erl.xml b/erts/doc/src/erl.xml index 09c9cf6812..2fd804cd04 100644 --- a/erts/doc/src/erl.xml +++ b/erts/doc/src/erl.xml @@ -981,6 +981,15 @@ add to the code path. See code(3).

+ + +

This environment variable may be set to a comma-separated + list of IP addresses, in which case the + epmd daemon + will listen only on the specified address(es) and on the + loopback address (which is implicitely added to the list if it + has not been specified).

+

This environment variable can contain the port number to use when -- cgit v1.2.3 From 6f9d175335350c515fca5cdb772b709939e59e5e Mon Sep 17 00:00:00 2001 From: Gabor Liptak Date: Sun, 19 Dec 2010 17:52:54 -0500 Subject: Add back documentation on .erlang processing --- erts/doc/src/erl.xml | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/erl.xml b/erts/doc/src/erl.xml index 77bd952d41..9aebcf6111 100644 --- a/erts/doc/src/erl.xml +++ b/erts/doc/src/erl.xml @@ -1015,6 +1015,49 @@

+ + Configuration +

The standard Erlang/OTP system can be re-configured to change the default + behavior on start-up.

+ + The .erlang Start-up File + +

When Erlang/OTP is started, the system searches for a file named .erlang + in the directory where Erlang/OTP is started. If not found, the user's home + directory is searched for an .erlang file.

+

If an .erlang file is found, it is assumed to contain valid Erlang expressions. + These expressions are evaluated as if they were input to the shell.

+

A typical .erlang file contains a set of search paths, for example:

+ +
+ user_default and shell_default + +

Functions in the shell which are not prefixed by a module name are assumed + to be functional objects (Funs), built-in functions (BIFs), or belong to the + module user_default or shell_default.

+

To include private shell commands, define them in a module user_default and + add the following argument as the first line in the .erlang file.

+ +
+ erl + +

If the contents of .erlang are changed and a private version of + user_default is defined, it is possible to customize the Erlang/OTP environment. + More powerful changes can be made by supplying command line arguments in the + start-up script erl. Refer to erl(1) and init(3) + for further information.

+
+
+
+ +
SEE ALSO

init(3), erl_prim_loader(3), -- cgit v1.2.3 From b02f03c979cda37e43828cd6e1787649f1d8ca8c Mon Sep 17 00:00:00 2001 From: Steve Vinoski Date: Tue, 22 Feb 2011 18:07:57 -0500 Subject: add support for checking if an ERL_NIF_TERM is an exception Add the enif_is_exception function to allow callers to determine whether an ERL_NIF_TERM represents an exception. (Currently the only supported exception is badarg since only enif_make_badarg exists, but this will likely be expanded in future releases.) This allows NIF code to call other NIF functions that return ERL_NIF_TERM and properly check to see if the returned terms are exceptions. Without the enif_is_exception function, developers have to create their own means of checking whether a function creates an exception, such as returning boolean success/failure indicators or some other special value indicating that an exception is in effect. The declaration of enif_is_exception in erl_nif_api_funcs.h respects the order of declarations required to keep compatibility on Windows. Add a new test to verify the operation of enif_is_exception. Modify the erl_nif man page to add a description of enif_is_exception and also to clarify the requirements of calling the enif_make_badarg function. If code calls enif_make_badarg, the env passed in gets set with exception information and so the return value of the calling function MUST be the badarg term returned from enif_make_badarg. Also clarify that the result of enif_make_badarg may be passed only to enif_is_exception and not to any other NIF API functions. --- erts/doc/src/erl_nif.xml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml index 4bbd4e2a54..cdce4ec0b8 100644 --- a/erts/doc/src/erl_nif.xml +++ b/erts/doc/src/erl_nif.xml @@ -688,6 +688,10 @@ typedef enum { Determine if a term is an empty list

Return true if term is an empty list.

+ intenif_is_exception(ErlNifEnv* env, ERL_NIF_TERM term) + Determine if a term is an exception +

Return true if term is an exception.

+
intenif_is_fun(ErlNifEnv* env, ERL_NIF_TERM term) Determine if a term is a fun

Return true if term is a fun.

@@ -738,7 +742,14 @@ typedef enum {
ERL_NIF_TERMenif_make_badarg(ErlNifEnv* env) Make a badarg exception. -

Make a badarg exception to be returned from a NIF.

+

Make a badarg exception to be returned from a NIF, and set + an associated exception reason in env. If + enif_make_badarg is called, the term it returns must + be returned from the function that called it. No other return value + is allowed. Also, the term returned from enif_make_badarg may + be passed only to + enif_is_exception and + not to any other NIF API function.

ERL_NIF_TERMenif_make_binary(ErlNifEnv* env, ErlNifBinary* bin) Make a binary term. -- cgit v1.2.3 From b2f3b6b3b254015e0fd6540353b22ccb3df71bf7 Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Tue, 1 Feb 2011 22:25:53 +0100 Subject: erts: Fix doc typos, duplication and readability --- erts/doc/src/driver.xml | 39 ++++++++++--------- erts/doc/src/erl_driver.xml | 94 +++++++++++++++++++++------------------------ 2 files changed, 63 insertions(+), 70 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/driver.xml b/erts/doc/src/driver.xml index db455312ec..2b1ed398ee 100644 --- a/erts/doc/src/driver.xml +++ b/erts/doc/src/driver.xml @@ -63,7 +63,8 @@

This is a simple driver for accessing a postgres database using the libpq C client library. Postgres is used because it's free and open source. For information - on postgres, refer to the website www.postgres.org.

+ on postgres, refer to the website + www.postgres.org.

The driver is synchronous, it uses the synchronous calls of the client library. This is only for simplicity, and is generally not good, since it will @@ -210,7 +211,7 @@ static void stop(ErlDrvData drv_data) input data is a string paramater for and . The returned data consists of Erlang terms.

The functions and are - utilities that is used to make the code shorter. + utilities that are used to make the code shorter. duplicates the string and zero-terminates it, since the postgres client library wants that. takes an buffer and allocates a binary and @@ -244,7 +245,7 @@ static int control(ErlDrvData drv_data, unsigned int command, char *buf, return r; } ]]> -

In is where we log in to the database. If the connection +

is where we log in to the database. If the connection was successful we store the connection handle in our driver data, and return ok. Otherwise, we return the error message from postgres, and store in the driver data.

@@ -264,7 +265,7 @@ static int do_connect(const char *s, our_data_t* data, ei_x_buff* x) } ]]>

If we are connected (if the connection handle is not ), - we log out from the database. We need to check if a we should + we log out from the database. We need to check if we should encode an ok, since we might get here from the function, which doesn't return data to the emulator.

-

We execute a query and encodes the result. Encoding is done +

We execute a query and encode the result. Encoding is done in another C module, which is also provided as sample code.

-

Here we simply checks the result from postgres, and +

Here we simply check the result from postgres, and if it's data we encode it as lists of lists with column data. Everything from postgres is C strings, so we just use to send @@ -392,7 +393,7 @@ disconnect(Port) -> select(Port, Query) -> binary_to_term(port_control(Port, ?DRV_SELECT, Query)). ]]> -

The api is simple: loads the driver, opens it +

The API is simple: loads the driver, opens it and logs on to the database, returning the Erlang port if successful, sends a query to the driver, and returns the result, closes the @@ -417,7 +418,7 @@ select(Port, Query) ->

Sometimes database queries can take long time to complete, in our driver, the emulator halts while the driver is doing its job. This is - often not acceptable, since no other Erlang processes + often not acceptable, since no other Erlang process gets a chance to do anything. To improve on our postgres driver, we reimplement it using the asynchronous calls in LibPQ.

@@ -472,7 +473,7 @@ typedef struct our_data_t { whether the driver is waiting for a connection or waiting for the result of a query. (This is needed since the entry will be called both when connecting and - when there is query result.)

+ when there is a query result.)

will be called again.

-

If we have result from a connect, indicated that we have data in +

If we have a result from a connect, indicated by having data in the buffer, we no longer need to select on output (), so we remove this by calling .

@@ -630,9 +631,9 @@ return_port_data(Port) -> message queue. The function above receives data from the port. Since the data is in binary format, we use to convert - it to Erlang term. Note that the driver is opened in - binary mode, is called with the option - . This means that data sent from the driver + it to an Erlang term. Note that the driver is opened in + binary mode ( is called with the option + ). This means that data sent from the driver to the emulator is sent as binaries. Without the option, they would have been lists of integers.

@@ -646,15 +647,15 @@ return_port_data(Port) -> of a list of integers. For large lists (more than 100000 elements), this will take some time, so we will perform this as an asynchronous task.

-

The asynchronous api for drivers are quite complicated. First +

The asynchronous API for drivers is quite complicated. First of all, the work must be prepared. In our example we do this in . We could have used just as well, but we want some variation in our examples. In our driver, we allocate - a structure that contains all needed for the asynchronous task + a structure that contains anything that's needed for the asynchronous task to do the work. This is done in the main emulator thread. Then the asynchronous function is called from a driver thread, - separate from the main emulator thread. Note that the driver- - functions are not reentrant, so they shouldn't be used. + separate from the main emulator thread. Note that the driver-functions + are not reentrant, so they shouldn't be used. Finally, after the function is completed, the driver callback is called from the main emulator thread, this is where we return the result to Erlang. (We can't @@ -692,7 +693,7 @@ static ErlDrvEntry next_perm_driver_entry = { be sent later from the call-back.

The will be passed to the function. We do not use a function (the last argument to - , it's only used if the task is cancelled + ), it's only used if the task is cancelled programmatically.

(drv_data); our_async_data* d = reinterpret_cast(async_data); int n = d->data.size(), result_n = n*2 + 3; - ErlDrvTermData* result = new ErlDrvTermData[result_n], * rp = result; + ErlDrvTermData *result = new ErlDrvTermData[result_n], *rp = result; for (vector::iterator i = d->data.begin(); i != d->data.end(); ++i) { *rp++ = ERL_DRV_INT; diff --git a/erts/doc/src/erl_driver.xml b/erts/doc/src/erl_driver.xml index 497a2fa01d..066a2a4b92 100644 --- a/erts/doc/src/erl_driver.xml +++ b/erts/doc/src/erl_driver.xml @@ -56,16 +56,16 @@ instance is connected to an Erlang port. Every port has a port owner process. Communication with the port is normally done through the port owner process.

-

Most of the functions takes the port handle as an +

Most of the functions take the port handle as an argument. This identifies the driver instance. Note that this port handle must be stored by the driver, it is not given when the driver is called from the emulator (see driver_entry).

-

Some of the functions takes a parameter of type +

Some of the functions take a parameter of type ErlDrvBinary, a driver binary. It should be both - allocated and freed by the caller. Using a binary directly avoid + allocated and freed by the caller. Using a binary directly avoids one extra copying of data.

-

Many of the output functions has a "header buffer", with +

Many of the output functions have a "header buffer", with hbuf and hlen parameters. This buffer is sent as a list before the binary (or list, depending on port mode) that is sent. This is convenient when matching on messages received from @@ -92,7 +92,7 @@ with SMP support without being rewritten if driver level locking is used.

-

It is assumed that drivers does not access other drivers. If +

It is assumed that drivers do not access other drivers. If drivers should access each other they have to provide their own mechanism for thread safe synchronization. Such "inter driver communication" is strongly discouraged.

@@ -113,12 +113,12 @@ call-backs may be made from different threads.

Most functions in this API are not thread-safe, i.e., - they may not be called from an arbitrary thread. Function + they may not be called from an arbitrary thread. Functions that are not documented as thread-safe may only be called from driver call-backs or function calls descending from a driver call-back call. Note that driver call-backs may be called from different threads. This, however, is not a problem for any - functions in this API, since the emulator have control over + function in this API, since the emulator has control over these threads.

Functions not explicitly documented as thread-safe are @@ -155,10 +155,10 @@ more information.

Output functions - With the output functions, the driver sends data back + With the output functions, the driver sends data back to the emulator. They will be received as messages by the port owner process, see open_port/2. The vector function and the - function taking a driver binary is faster, because that avoid + function taking a driver binary are faster, because they avoid copying the data buffer. There is also a fast way of sending terms from the driver, without going through the binary term format. @@ -193,14 +193,14 @@ use functionality from the POSIX thread API or the Windows native thread API.

-

The Erlang driver thread API only return error codes when it is +

The Erlang driver thread API only returns error codes when it is reasonable to recover from an error condition. If it isn't reasonable to recover from an error condition, the whole runtime system is terminated. For example, if a create mutex operation fails, an error code is returned, but if a lock operation on a mutex fails, the whole runtime system is terminated.

-

Note that there exist no "condition variable wait with timeout" in +

Note that there exists no "condition variable wait with timeout" in the Erlang driver thread API. This is due to issues with pthread_cond_timedwait(). When the system clock suddenly is changed, it isn't always guaranteed that you will wake up from @@ -241,7 +241,7 @@ to give you better error reports.

- Adding / remove drivers + Adding / removing drivers A driver can add and later remove drivers. Monitoring processes A driver can monitor a process that does not own a port. @@ -262,7 +262,7 @@ could, under rare circumstances, mean that drivers have to be slightly modified. If so, this will of course be documented. ERL_DRV_EXTENDED_MINOR_VERSION will be incremented when - new features are added. The runtime system use the minor version + new features are added. The runtime system uses the minor version of the driver to determine what features to use. The runtime system will refuse to load a driver if the major versions differ, or if the major versions are equal and the @@ -273,7 +273,7 @@ It can, however, not make sure that it isn't incompatible. Therefore, when loading a driver that doesn't use the extended driver interface, there is a risk that it will be loaded also when - the driver is incompatible. When the driver use the extended driver + the driver is incompatible. When the driver uses the extended driver interface, the emulator can verify that it isn't of an incompatible driver version. You are therefore advised to use the extended driver interface.

@@ -309,7 +309,7 @@ typedef struct ErlDrvSysInfo { driver_system_info() will write the system information when passed a reference to a ErlDrvSysInfo structure. A description of the - fields in the structure follow: + fields in the structure follows:

driver_major_version @@ -347,14 +347,6 @@ typedef struct ErlDrvSysInfo { A value != 0 if the runtime system has SMP support; otherwise, 0. - thread_support - A value != 0 if the runtime system has thread support; - otherwise, 0. - - smp_support - A value != 0 if the runtime system has SMP support; - otherwise, 0. - async_threads The number of async threads in the async thread pool used by driver_async() @@ -401,8 +393,8 @@ typedef struct ErlDrvBinary { driver_binary_dec_refc().

Some driver calls, such as driver_enq_binary, - increments the driver reference count, and others, such as - driver_deq decrements it.

+ increment the driver reference count, and others, such as + driver_deq decrement it.

Using a driver binary instead of a normal buffer, is often faster, since the emulator doesn't need to copy the data, only the pointer is used.

@@ -415,7 +407,7 @@ typedef struct ErlDrvBinary { driver_outputv calls, and in the queue. Also the driver call-back outputv uses driver binaries.

-

If the driver of some reason or another, wants to keep a +

If the driver for some reason or another, wants to keep a driver binary around, in a static variable for instance, the reference count should be incremented, and the binary can later be freed in the stop call-back, with @@ -423,7 +415,7 @@ typedef struct ErlDrvBinary {

Note that since a driver binary is shared by the driver and the emulator, a binary received from the emulator or sent to the emulator, must not be changed by the driver.

-

From erts version 5.5 (OTP release R11B), orig_bytes is +

Since erts version 5.5 (OTP release R11B), orig_bytes is guaranteed to be properly aligned for storage of an array of doubles (usually 8-byte aligned).

@@ -447,7 +439,7 @@ typedef struct ErlIOVec { int vsize; int size; SysIOVec* iov; - >ErlDrvBinary** binv; + ErlDrvBinary** binv; } ErlIOVec;

The I/O vector used by the emulator and drivers, is a list @@ -495,17 +487,17 @@ typedef struct ErlIOVec { Currently, the only port specific data that the emulator associates with the port data lock is the driver queue.

Normally a driver instance does not have a port data lock. If - the driver instance want to use a port data lock, it has to + the driver instance wants to use a port data lock, it has to create the port data lock by calling driver_pdl_create(). NOTE: Once the port data lock has been created, every - access to data associated with the port data lock have to be done + access to data associated with the port data lock has to be done while having the port data lock locked. The port data lock is locked, and unlocked, respectively, by use of driver_pdl_lock(), and driver_pdl_unlock().

A port data lock is reference counted, and when the reference - count reach zero, it will be destroyed. The emulator will at + count reaches zero, it will be destroyed. The emulator will at least increment the reference count once when the lock is created and decrement it once when the port associated with the lock terminates. The emulator will also increment the @@ -545,7 +537,7 @@ typedef struct ErlIOVec {

suggested_stack_size - A suggestion, in kilo-words, on how large stack to use. A value less + A suggestion, in kilo-words, on how large a stack to use. A value less than zero means default size. @@ -648,7 +640,7 @@ typedef struct ErlIOVec { opened.

The data is queued in the port owner process' message queue. Note that this does not yield to the emulator. (Since - the driver and the emulator runs in the same thread.)

+ the driver and the emulator run in the same thread.)

The parameter buf points to the data to send, and len is the number of bytes.

The return value for all output functions is 0. (Unless the @@ -749,7 +741,7 @@ typedef struct ErlIOVec { function timeout is called.

Note that there is only one timer on each driver instance; setting a new timer will replace an older one.

-

Return value i 0 (-1 only when the timeout driver +

Return value is 0 (-1 only when the timeout driver function is NULL).

@@ -799,20 +791,20 @@ typedef struct ErlIOVec { event object must be a socket or pipe (or other object that select/poll can use). On windows, the Win32 API function WaitForMultipleObjects - is used. This places other restriction on the event object. + is used. This places other restrictions on the event object. Refer to the Win32 SDK documentation.

The on parameter should be 1 for setting events and 0 for clearing them.

-

The mode argument is bitwise-or combination of +

The mode argument is a bitwise-or combination of ERL_DRV_READ, ERL_DRV_WRITE and ERL_DRV_USE. - The first two specifies whether to wait for read events and/or write + The first two specify whether to wait for read events and/or write events. A fired read event will call ready_input while a fired write event will call ready_output.

-

Some OS (Windows) does not differ between read and write events. +

Some OS (Windows) do not differentiate between read and write events. The call-back for a fired event then only depends on the value of mode.

ERL_DRV_USE specifies if we are using the event object or if we want to close it. @@ -834,9 +826,9 @@ typedef struct ErlIOVec { as before. But it is recommended to update them to use ERL_DRV_USE and stop_select to make sure that event objects are closed in a safe way.

-

The return value is 0 (Failure, -1, only if the +

The return value is 0 (failure, -1, only if the ready_input/ready_output is - NULL.

+ NULL).

@@ -1076,7 +1068,7 @@ typedef struct ErlIOVec { array of SysIOVecs. It also returns the number of elements in vlen. This is the only way to get data out of the queue.

-

Nothing is remove from the queue by this function, that must be done +

Nothing is removed from the queue by this function, that must be done with driver_deq.

The returned array is suitable to use with the Unix system call writev.

@@ -1209,7 +1201,7 @@ typedef struct ErlIOVec { Stop monitoring a process from a driver -

This function cancels an monitor created earlier.

+

This function cancels a monitor created earlier.

The function returns 0 if a monitor was removed and > 0 if the monitor did no longer exist.

@@ -1326,7 +1318,7 @@ typedef struct ErlIOVec {

This function signals to erlang that the driver has encountered an EOF and should be closed, unless the port was opened with the eof option, in that case eof is sent - to the port. Otherwise, the port is close and an + to the port. Otherwise, the port is closed and an 'EXIT' message is sent to the port owner process.

The return value is 0.

@@ -1349,8 +1341,8 @@ typedef struct ErlIOVec { (driver_failure).

The driver should fail only when in severe error situations, when the driver cannot possibly keep open, for instance - buffer allocation gets out of memory. Normal errors is more - appropriate to handle with sending error codes with + buffer allocation gets out of memory. For normal errors + it is more appropriate to send error codes with driver_output.

The return value is 0.

@@ -1371,7 +1363,7 @@ typedef struct ErlIOVec {

This function returns the process id of the process that made the current call to the driver. The process id can be used with driver_send_term to send back data to the - caller. driver_caller() only return valid data + caller. driver_caller() only returns valid data when currently executing in one of the following driver callbacks:

@@ -1409,7 +1401,7 @@ typedef struct ErlIOVec { tuple, the elements are given first, and then the tuple term, with a count. Likewise for lists.

A tuple must be specified with the number of elements. (The - elements precedes the ERL_DRV_TUPLE term.)

+ elements precede the ERL_DRV_TUPLE term.)

A list must be specified with the number of elements, including the tail, which is the last term preceding ERL_DRV_LIST.

@@ -1518,7 +1510,7 @@ ERL_DRV_EXT2TERM char *buf, ErlDrvUInt len }; driver_output_term(port, spec, sizeof(spec) / sizeof(spec[0])); ]]>
-

If you want to pass a binary and doesn't already have the content +

If you want to pass a binary and don't already have the content of the binary in an ErlDrvBinary, you can benefit from using ERL_DRV_BUF2BINARY instead of creating an ErlDrvBinary via driver_alloc_binary() and then pass the binary via @@ -1565,7 +1557,7 @@ ERL_DRV_EXT2TERM char *buf, ErlDrvUInt len other processes than the port owner process. The receiver parameter specifies the process to receive the data.

-

The parameters term and n does the same thing +

The parameters term and n do the same thing as in driver_output_term.

This function is only thread-safe when the emulator with SMP support is used.

@@ -1660,7 +1652,7 @@ ERL_DRV_EXT2TERM char *buf, ErlDrvUInt len

This function locks the driver used by the port port - in memory for the rest of the emulator process + in memory for the rest of the emulator process' lifetime. After this call, the driver behaves as one of Erlang's statically linked in drivers.

@@ -1904,7 +1896,7 @@ ERL_DRV_EXT2TERM char *buf, ErlDrvUInt len corresponding to one of the involved thread identifiers has terminated since the thread identifier was saved, the result of erl_drv_equal_tids() might not give - expected result. + the expected result.

This function is thread-safe.

-- cgit v1.2.3 From 75a01b2b20077494e95cd828d038e9aef22a9502 Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Sun, 27 Feb 2011 19:02:13 +0100 Subject: Remove gratuitous paren in driver_entry --- erts/doc/src/driver_entry.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'erts/doc') diff --git a/erts/doc/src/driver_entry.xml b/erts/doc/src/driver_entry.xml index dfddbb18ea..7860d83d83 100644 --- a/erts/doc/src/driver_entry.xml +++ b/erts/doc/src/driver_entry.xml @@ -121,7 +121,7 @@ typedef struct erl_drv_entry { the port */ void (*ready_input)(ErlDrvData drv_data, ErlDrvEvent event); /* called when we have input from one of - the driver's handles) */ + the driver's handles */ void (*ready_output)(ErlDrvData drv_data, ErlDrvEvent event); /* called when output is possible to one of the driver's handles */ -- cgit v1.2.3 From ca8dcd1911a9a382ac8dd0d511d009d5c3ae37c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Mon, 11 Apr 2011 15:08:06 +0200 Subject: Remove documentation for non-existent init:get_args/0 init:get_args/0 was deprecated in R9C and removed in R12B. Reported-by: Eric Pailleau --- erts/doc/src/init.xml | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/init.xml b/erts/doc/src/init.xml index 33364c709a..0e828389f6 100644 --- a/erts/doc/src/init.xml +++ b/erts/doc/src/init.xml @@ -66,19 +66,6 @@ respectively.

- - get_args() -> [Arg] - Get all non-flag command line arguments - - Arg = atom() - - -

Returns any plain command line arguments as a list of atoms - (possibly empty). It is recommended that - get_plain_arguments/1 is used instead, because of - the limited length of atoms.

-
-
get_argument(Flag) -> {ok, Arg} | error Get the values associated with a command line user flag -- cgit v1.2.3 From 4380605cd282d1a54afa26add33e3c666eacfcbc Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Tue, 26 Apr 2011 19:47:52 +0200 Subject: driver_entry: Remove gratuitous paren and fix typo --- erts/doc/src/driver_entry.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/driver_entry.xml b/erts/doc/src/driver_entry.xml index 7860d83d83..8bdd154cb9 100644 --- a/erts/doc/src/driver_entry.xml +++ b/erts/doc/src/driver_entry.xml @@ -133,7 +133,7 @@ typedef struct erl_drv_entry { int (*control)(ErlDrvData drv_data, unsigned int command, char *buf, int len, char **rbuf, int rlen); /* "ioctl" for drivers - invoked by - port_control/3) */ + port_control/3 */ void (*timeout)(ErlDrvData drv_data); /* Handling of timeout in driver */ void (*outputv)(ErlDrvData drv_data, ErlIOVec *ev); /* called when we have output from erlang @@ -146,7 +146,7 @@ typedef struct erl_drv_entry { before 'stop' can be called */ int (*call)(ErlDrvData drv_data, unsigned int command, char *buf, int len, char **rbuf, int rlen, unsigned int *flags); - /* Works mostly like 'control', a syncronous + /* Works mostly like 'control', a synchronous call into the driver. */ void (*event)(ErlDrvData drv_data, ErlDrvEvent event, ErlDrvEventData event_data); -- cgit v1.2.3 From 1307af30ec3e2bfaeeca45a63fbc944791662226 Mon Sep 17 00:00:00 2001 From: Jonas Faklkevik Date: Mon, 2 May 2011 20:10:05 +0200 Subject: Teach run_erl RUN_ERL_DISABLE_FLOWCNTRL for disabling flow control Flow control can cause unwanted behaviour of the beam process, if accidentally hit Ctrl-S (instead of Ctrl-D to detach) the entire beam may be blocked. Fix this problem by making it possible to turn off flow control by setting the environment variable RUN_ERL_DISABLE_FLOWCNTRL. --- erts/doc/src/run_erl.xml | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/run_erl.xml b/erts/doc/src/run_erl.xml index 7bf7f559c5..da08859c7b 100644 --- a/erts/doc/src/run_erl.xml +++ b/erts/doc/src/run_erl.xml @@ -144,6 +144,14 @@ The size (in bytes) of a log file before switching to a new log file. Default is 100000, minimum is 1000 and maximum is approximately 2^30. + RUN_ERL_DISABLE_FLOWCNTRL + If defined, disables input and output flow control for the pty opend by run_erl. + Useful if you want to remove any risk of accidentally blocking the flow control + by hit Ctrl-S (instead of Ctrl-D to detach). + Which may result in blocking of the entire beam process + and in the case of running heart as supervisor + even the heart process will be blocked when writing log message to terminal. + Leaving the heart process unable to do its work.
-- cgit v1.2.3 From 742722ec551b7cd4f9ee53190443ee422bb8c794 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Tue, 10 May 2011 15:40:27 +0200 Subject: Present 'low' memory count for halfword-vm with erlang:memory() --- erts/doc/src/erlang.xml | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index 19f501391f..f98e15cb52 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -2356,6 +2356,14 @@ os_prompt% instrument(3) and/or erl(1).

+ low + +

Only on 64-bit halfword emulator.

+

The total amount of memory allocated in low memory areas + that are restricted to less than 4 Gb even though + the system may have more physical memory.

+

May be removed in future releases of halfword emulator.

+

The system value is not complete. Some allocated -- cgit v1.2.3 From ad5a1519e74d79218c0dd2ef79a39d75bd0155bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn-Egil=20Dahlberg?= Date: Fri, 20 May 2011 16:11:43 +0200 Subject: Update copyright years --- erts/doc/src/driver.xml | 2 +- erts/doc/src/epmd.xml | 2 +- erts/doc/src/erl_driver.xml | 2 +- erts/doc/src/init.xml | 2 +- erts/doc/src/run_erl.xml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/driver.xml b/erts/doc/src/driver.xml index 2b1ed398ee..9f246c4a6c 100644 --- a/erts/doc/src/driver.xml +++ b/erts/doc/src/driver.xml @@ -4,7 +4,7 @@

- 20012010 + 20012011 Ericsson AB. All Rights Reserved. diff --git a/erts/doc/src/epmd.xml b/erts/doc/src/epmd.xml index 8c3c1e5237..411e627c85 100644 --- a/erts/doc/src/epmd.xml +++ b/erts/doc/src/epmd.xml @@ -4,7 +4,7 @@
- 19962010 + 19962011 Ericsson AB. All Rights Reserved. diff --git a/erts/doc/src/erl_driver.xml b/erts/doc/src/erl_driver.xml index 066a2a4b92..2fb03954b6 100644 --- a/erts/doc/src/erl_driver.xml +++ b/erts/doc/src/erl_driver.xml @@ -4,7 +4,7 @@
- 20012010 + 20012011 Ericsson AB. All Rights Reserved. diff --git a/erts/doc/src/init.xml b/erts/doc/src/init.xml index 0e828389f6..b0d0cda4fa 100644 --- a/erts/doc/src/init.xml +++ b/erts/doc/src/init.xml @@ -4,7 +4,7 @@
- 19962009 + 19962011 Ericsson AB. All Rights Reserved. diff --git a/erts/doc/src/run_erl.xml b/erts/doc/src/run_erl.xml index da08859c7b..c9784299b3 100644 --- a/erts/doc/src/run_erl.xml +++ b/erts/doc/src/run_erl.xml @@ -4,7 +4,7 @@
- 19992009 + 19992011 Ericsson AB. All Rights Reserved. -- cgit v1.2.3 From 4a5a75811e2cd590b5c94f71864a5245fd511ccf Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Tue, 24 May 2011 13:16:24 +0200 Subject: Prepare release --- erts/doc/src/notes.xml | 351 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 351 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index 7383ea381d..3733fb2db9 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -30,6 +30,357 @@

This document describes the changes made to the ERTS application.

+
Erts 5.8.4 + +
Fixed Bugs and Malfunctions + + +

Fix binary and iolist overflow problems. Typically + problems arose in length calculation where the result + would exceed (1 bsl 32 - 1).

+

+ Own Id: OTP-9118

+
+ +

+ Using the old erlang shell (i.e. erl instead on werl) on + windows and doing several init:restart's would eventually + hang the VM. That is no longer the case.

+

+ Own Id: OTP-9139

+
+ +

+ Removed recursive C code when printing Erlang terms to + buffers, avoiding stack overflows that could cause VM to + crash.

+

+ Own Id: OTP-9140

+
+ +

+ The send_timeout option in gen_tcp did not work properly + in active mode or with {active,once} options. This is now + corrected.

+

+ Own Id: OTP-9145

+
+ +

+ Fixed various typos across the documentation (Thanks to + Tuncer Ayaz)

+

+ Own Id: OTP-9154

+
+ +

Remove duplicate stack entries which could occur after + calling certain BIFs.

+

+ Own Id: OTP-9163

+
+ +

+ A race when starting two nodes simultaneously using + run_erl has been removed.

+

+ Own Id: OTP-9164

+
+ +

+ Add documentation on .erlang processing back again + (Thanks to Gabor Liptak)

+

+ Own Id: OTP-9189

+
+ +

+ Remove gratuitous paren in driver_entry(Thanks to Tuncer + Ayaz)

+

+ Own Id: OTP-9192

+
+ +

+ Fix some wrong pointer dereferences (Thanks to Cristian + Greco)

+

+ Own Id: OTP-9194

+
+ +

+ erts: Remove unused variables (Thanks to Tuncer Ayaz)

+

+ Own Id: OTP-9205

+
+ +

+ The documentation for init:get_args/0 has been + removed. init:get_args/0 itself was deprecated in + R9C and removed in R12B. (Thanks to Eric Pailleau.)

+

+ Own Id: OTP-9209

+
+ +

+ Allow user to specify the IP address epmd binds to

+

+ The IP address(es) epmd binds to can now be specified by + the user, either via epmd's new "-address" option or (if + that's not used) by setting the environment variable + ERL_EPMD_ADDRESS. Multiple addresses may be specified + using a comma-separated list. If the loopback address is + not in this list, it will be added implicitly, so that + the daemon can be queried by an interactive epmd + process.(Thanks to Holger Weiß)

+

+ Own Id: OTP-9213

+
+ +

+ epmd: include host address in local access check

+

+ In FreeBSD jails, the source and destination address of + connections to localhost are changed to be the IP address + of the jail. Consider connections from the host's IP + address to itself (e.g., the source and destination + address match) to be local for the access control checks. + (Thanks to Michal Santos and Tom at diogunix.com)

+

+ Own Id: OTP-9214

+
+ +

+ Fix list returned by net_kernel:epmd_module

+

+ Function epmd_module of net_kernel returns a list instead + of an atom, when the epmd_module-flag is used. (Thanks to + Markus Knofe)

+

+ Own Id: OTP-9215

+
+ +

+ Fix epmd's dbg_perror() output

+

+ The dbg_perror() function now hands the current errno + value over to dbg_gen_printf(). This fixes the problem + that errno had been reset to zero by the time it was used + (to print the corresponding error message) in the + dbg_gen_printf() function. (Thanks to Holger Weiß)

+

+ Own Id: OTP-9223

+
+ +

+ heart: remove garbage appended to heart command

+

+ heart:get_cmd/0 is documented to return an empty string + if the command is cleared. get_cmd/0 returns 2 extra + bytes: 1 byte for the trailing null, 1 byte from the op + (the op is an unsigned char and 2 bytes are allocated for + it in the returned buffer). (Thanks to Michael Santos)

+

+ Own Id: OTP-9224

+
+ +

+ file: fix hang reading compressed files

+

+ The gzio driver goes into an infinite loop when reading + past the end of a compressed file. Reported-By: Alex + Morarash (Thanks to Michael Santos)

+

+ Own Id: OTP-9245

+
+ +

Eliminate alias warnings from gcc 4.5.2

+

+ Own Id: OTP-9250

+
+ +

+ Unsigned integer may overflow in error message (Thanks to + Michael Santos)

+

+ Own Id: OTP-9251

+
+ +

+ Driver names should be strings, not atoms

+

+ Own Id: OTP-9253

+
+ +

+ driver_entry: Remove gratuitous paren and fix typo + (Thanks to Tuncer Ayaz)

+

+ Own Id: OTP-9254

+
+ +

+ Fix format specifiers in erl_exit messages

+

+ Fix an error message by using an unsigned integer + specifier as seen in a tweet by @metabrew: #erlang VM + crashed with "no next heap size found: -2090496108, + offset 0", suddenly allocated all available RAM

+

+ Also correct mis-typed string formats in bif.c.(Thanks to + Michael Santos)

+

+ Own Id: OTP-9262

+
+ +

+ net_drv: remove unused tcp request id inet_drv: remove + gratuitous assignment (Thanks to Tuncer Ayaz)

+

+ Own Id: OTP-9263

+
+ +

+ Teach run_erl RUN_ERL_DISABLE_FLOWCNTRL for disabling + flow control

+

+ Flow control can cause unwanted behaviour of the beam + process, if accidentally hit Ctrl-S (instead of Ctrl-D to + detach) the entire beam may be blocked.

+

+ Fix this problem by making it possible to turn off flow + control by setting the environment variable + RUN_ERL_DISABLE_FLOWCNTRL. (Thanks to Jonas Faklkevik)

+

+ Own Id: OTP-9270

+
+ +

The following bugs due to missing memory barriers have + been fixed:

ETS tables using the + write_concurrency option could potentially get + into an internally inconsistent state.

+

ETS tables using the ordered_set option + could potentially get into an internally inconsistent + state.

A number of memory barriers + have been added when building with the + libatomic_ops API (i.e. when passing + --with-libatomic_ops=PATH to configure) and + the tilera atomics API (i.e. when building for the tilera + chip). Note that these bugs were due to erroneous usage + of the APIs, and not in the implementations of the APIs. + When using these APIs the following bugs where + present:

The BIF + erlang:ports/0 could return an erroneous result. +

A thread blocking other threads + during code loading, or setup of tracing could + potentially read invalid data.

+ Fixation of ETS tables could potentially get into an + internally inconsistent state.

+
+

+ Own Id: OTP-9281

+
+ +

+ Fix halfword bug for ETS ordered_set when doing + select/match with partly bound key.

+

+ Own Id: OTP-9292

+
+ +

+ Fix bug in code:is_module_native that caused crash + for deleted modules.

+

+ Own Id: OTP-9298

+
+ +

+ Calling driver_async_cancel() could cause a + scheduler thread to enter an eternal loop doing no useful + work. (Thanks to Anders Ramsell)

+

+ Own Id: OTP-9302

+
+
+
+ + +
Improvements and New Features + + +

+ New enif_is_exception function to allow NIFs to + determine whether an ERL_NIF_TERM represents an + exception. (Thanks to Steve Vinoski)

+

+ Own Id: OTP-9150

+
+ +

+ A process being garbage collected by another process + could be scheduled on another scheduler. This prevented + this scheduler from doing any useful work until the + garbage collection was done. This either occurred due to + a explicit call to the garbage_collect/1 BIF, or + due to a garbage collection part of code loading. A + process being garbage collected like this will now not be + scheduled until the garbage collection has completed.

+

+ Own Id: OTP-9211

+
+ +

+ Remove unnecessary validation copy in + prim_file:drv_command/3 (Thanks to Tony Rogvall)

+

+ Own Id: OTP-9276

+
+ +

+ Symbolic link handling on windows have been slightly + updated to map error conditions more consequently and + correctly read directory links created outside of the + Erlang environment.

+

+ Own Id: OTP-9279

+
+ +

+ Due to standard library DLL mismatches between versions + of OpenSSL and Erlang/OTP, OpenSSL is now linked + statically to the crypto driver on Windows. This fixes + problems starting crypto when running Erlang as a service + on all Windows versions.

+

+ Own Id: OTP-9280

+
+ +

Halfword emulator memory handling improvements:

+

Much more of internal memory structures + have been made able to use "high" memory and are no + longer restricted to the 4Gb limit that still applies for + all process heap data.

Fixed faulty + values from erlang:memory() caused by 32-bit + counter overflow.

New counter + low in erlang:memory() that sums up all + memory restricted by 4Gb limit.

+

+ Own Id: OTP-9291 Aux Id: seq11841

+
+ +

+ The value set in the undocumented and unsupported + ERL_version_FLAGS (e.g. ERL_R14B03_FLAGS) environment + variable can now be overridden by the command line + (similar to ERL_AFLAGS).

+

+ Own Id: OTP-9297

+
+
+
+ +
+
Erts 5.8.3.2
Known Bugs and Problems -- cgit v1.2.3