Menu
However, you may need to get the list of processes (especially the short-lived processes) that executed for some time and then terminated. Process Monitor can be helpful to get that info. Using Process Monitor to Track Process Start and Exit Events. Start Process Monitor, enable Process activity button and disable the rest. Process Monitor is even better when it comes to troubleshooting misbehaving applications. Suppose you're trying to run a program called app.exe, for instance, only it crashes immediately, and you don't know why. What's going on? Run Process Monitor first and it can show you exactly which files and Registry keys that app.exe is looking for.
Conveniences for working with processes and the process dictionary.
Besides the functions available in this module, the
Kernel
moduleexposes and auto-imports some basic functionality related to processesavailable through the following functions:Kernel.spawn/1
andKernel.spawn/3
Kernel.spawn_link/1
andKernel.spawn_link/3
Kernel.spawn_monitor/1
andKernel.spawn_monitor/3
While this module provides low-level conveniences to work with processes,developers typically use abstractions such as
Agent
, GenServer
,Registry
, Supervisor
and Task
for building their systems andresort to this module for gathering information, trapping exits, linksand monitoring.Types
A process destination.
Functions
Tells whether the given process is alive on the local node.
Cancels a timer returned by
send_after/3
.Deletes the given
key
from the process dictionary.Demonitors the monitor identified by the given
reference
.Sends an exit signal with the given
reason
to pid
.Sets the given
flag
to value
for the calling process.Sets the given
flag
to value
for the given process pid
.Returns all key-value pairs in the process dictionary.
Returns the value for the given
key
in the process dictionary,or default
if key
is not set.Returns all keys in the process dictionary.
Returns all keys in the process dictionary that have the given
value
.Returns the PID of the group leader for the calling process.
Sets the group leader of the given
pid
to leader
.Puts the calling process into a 'hibernation' state.
Returns information about the process identified by
pid
, or returns nil
if the processis not alive.Returns information about the process identified by
pid
,or returns nil
if the process is not alive.Creates a link between the calling process and the given item (process orport).
Returns a list of PIDs corresponding to all theprocesses currently existing on the local node.
Starts monitoring the given
item
from the calling process.Stores the given
key
-value
pair in the process dictionary.Reads a timer created by
send_after/3
.Registers the given
pid_or_port
under the given name
.Returns a list of names which have been registered using
register/2
.Sends a message to the given
dest
.Sends
msg
to dest
after time
milliseconds.Sleeps the current process for the given
timeout
.Spawns the given function according to the given options.
Spawns the given function
fun
from module mod
, passing the given args
according to the given options.Removes the link between the calling process and the given item (process orport).
Removes the registered
name
, associated with a PIDor a port identifier.Returns the PID or port identifier registered under
name
or nil
if thename is not registered.Specs
A process destination.
A remote or local PID, a local port, a locally registered name, or a tuple inthe form of
{registered_name, node}
for a registered name at another node.Specs
Specs
Specs
Tells whether the given process is alive on the local node.
If the process identified by
pid
is alive (that is, it's not exiting and hasnot exited yet) than this function returns true
. Otherwise, it returnsfalse
.pid
must refer to a process running on the local node or ArgumentError
is raised.Inlined by the compiler.
Specs
Cancels a timer returned by
send_after/3
.When the result is an integer, it represents the time in millisecondsleft until the timer would have expired.
When the result is
false
, a timer corresponding to timer_ref
could not befound. This can happen either because the timer expired, because it hasalready been canceled, or because timer_ref
never corresponded to a timer.Even if the timer had expired and the message was sent, this function does nottell you if the timeout message has arrived at its destination yet.
Inlined by the compiler.
Options
:async
- (boolean) whenfalse
, the request for cancellation issynchronous. Whentrue
, the request for cancellation is asynchronous,meaning that the request to cancel the timer is issued and:ok
isreturned right away. Defaults tofalse
.:info
- (boolean) whether to return information about the timer beingcancelled. When the:async
option isfalse
and:info
istrue
, theneither an integer orfalse
(like described above) is returned. If:async
isfalse
and:info
isfalse
,:ok
is returned. If:async
istrue
and:info
istrue
, a message in the form{:cancel_timer, timer_ref, result}
(whereresult
is an integer orfalse
likedescribed above) is sent to the caller of this function when thecancellation has been performed. If:async
istrue
and:info
isfalse
, no message is sent. Defaults totrue
.
Specs
Deletes the given
key
from the process dictionary.Returns the value that was under
key
in the process dictionary,or nil
if key
was not stored in the process dictionary.Examples
Specs
Demonitors the monitor identified by the given
reference
.If
monitor_ref
is a reference which the calling processobtained by calling monitor/1
, that monitoring is turned off.If the monitoring is already turned off, nothing happens.See
:erlang.demonitor/2
for more information.Inlined by the compiler.
Examples
Specs
Sends an exit signal with the given
reason
to pid
.The following behaviour applies if
reason
is any term except :normal
or :kill
:- If
pid
is not trapping exits,pid
will exit with the givenreason
. - If
pid
is trapping exits, the exit signal is transformed into amessage{:EXIT, from, reason}
and delivered to the message queueofpid
.
If
reason
is the atom :normal
, pid
will not exit (unless pid
isthe calling process, in which case it will exit with the reason :normal
).If it is trapping exits, the exit signal is transformed into a message{:EXIT, from, :normal}
and delivered to its message queue.If
reason
is the atom :kill
, that is if Process.exit(pid, :kill)
is called,an untrappable exit signal is sent to pid
which will unconditionally exitwith reason :killed
.Inlined by the compiler.
Examples
Specs
Sets the given
flag
to value
for the calling process.Returns the old value of
flag
.See
:erlang.process_flag/2
for more information.Inlined by the compiler.
Specs
Sets the given
flag
to value
for the given process pid
.Returns the old value of
flag
.It raises
ArgumentError
if pid
is not a local process.The allowed values for
flag
are only a subset of those allowed in flag/2
,namely :save_calls
.See
:erlang.process_flag/3
for more information.Inlined by the compiler.
Specs
Returns all key-value pairs in the process dictionary.
Inlined by the compiler.
Specs
Returns the value for the given
key
in the process dictionary,or default
if key
is not set.Examples
Specs
Returns all keys in the process dictionary.
Inlined by the compiler.
Examples
Specs
Returns all keys in the process dictionary that have the given
value
.Inlined by the compiler.
Specs
Returns the PID of the group leader for the calling process.
Inlined by the compiler.
Examples
Specs
Sets the group leader of the given
pid
to leader
.Typically, this is used when a process started from a certain shell shouldhave a group leader other than
:init
.Inlined by the compiler.
Specs
Puts the calling process into a 'hibernation' state.
The calling process is put into a waiting statewhere its memory allocation has been reduced as much as possible,which is useful if the process does not expect to receive any messagesin the near future.
See
:erlang.hibernate/3
for more information.Inlined by the compiler.
Specs
Returns information about the process identified by
pid
, or returns nil
if the processis not alive.Use this only for debugging information.
See
:erlang.process_info/1
for more information.Specs
Returns information about the process identified by
pid
,or returns nil
if the process is not alive.See
:erlang.process_info/2
for more information.Specs
Creates a link between the calling process and the given item (process orport).
Links are bidirectional. Linked processes can be unlinked by using
unlink/1
.If such a link exists already, this function does nothing since there can onlybe one link between two given processes. If a process tries to create a linkto itself, nothing will happen.
When two processes are linked, each one receives exit signals from the other(see also
exit/2
). Let's assume pid1
and pid2
are linked. If pid2
exits with a reason other than :normal
(which is also the exit reason usedwhen a process finishes its job) and pid1
is not trapping exits (seeflag/2
), then pid1
will exit with the same reason as pid2
and in turnemit an exit signal to all its other linked processes. The behaviour whenpid1
is trapping exits is described in exit/2
.See
:erlang.link/1
for more information.Inlined by the compiler.
Specs
Returns a list of PIDs corresponding to all theprocesses currently existing on the local node.
Note that if a process is exiting, it is considered to exist but not bealive. This means that for such process,
alive?/1
will return false
butits PID will be part of the list of PIDs returned by this function.See
:erlang.processes/0
for more information.Inlined by the compiler.
Examples
Specs
Starts monitoring the given
item
from the calling process.Once the monitored process dies, a message is delivered to themonitoring process in the shape of:
where:
ref
is a monitor reference returned by this function;object
is either apid
of the monitored process (if monitoringa PID) or{name, node}
(if monitoring a remote or local name);reason
is the exit reason.
If the process is already dead when calling
Process.monitor/1
, a:DOWN
message is delivered immediately.See the need for monitoringfor an example. See
:erlang.monitor/2
for more information.Inlined by the compiler.
Examples
Specs
Stores the given
key
-value
pair in the process dictionary.The return value of this function is the value that was previously storedunder
key
, or nil
in case no value was stored under it.Examples
Specs
Reads a timer created by
send_after/3
.When the result is an integer, it represents the time in millisecondsleft until the timer will expire.
When the result is
false
, a timer corresponding to timer_ref
could not befound. This can be either because the timer expired, because it has alreadybeen canceled, or because timer_ref
never corresponded to a timer.Even if the timer had expired and the message was sent, this function does nottell you if the timeout message has arrived at its destination yet.
Inlined by the compiler.
Specs
Registers the given
pid_or_port
under the given name
.name
must be an atom and can then be used instead of thePID/port identifier when sending messages with Kernel.send/2
.register/2
will fail with ArgumentError
in any of the following cases:- the PID/Port is not existing locally and alive
- the name is already registered
- the
pid_or_port
is already registered under a differentname
The following names are reserved and cannot be assigned toprocesses nor ports:
nil
false
true
:undefined
Examples
Specs
Returns a list of names which have been registered using
register/2
.Inlined by the compiler.
Examples
Specs
Skyshines bedlam 3 10 download free. Sends a message to the given
dest
.dest
may be a remote or local PID, a local port, a locallyregistered name, or a tuple in the form of {registered_name, node}
for aregistered name at another node.Inlined by the compiler.
Options
:noconnect
- when used, if sending the message would require anauto-connection to another node the message is not sent and:noconnect
isreturned.:nosuspend
- when used, if sending the message would cause the sender tobe suspended the message is not sent and:nosuspend
is returned.
Otherwise the message is sent and
:ok
is returned.Examples
Specs
Sends
msg
to dest
after time
milliseconds.If
dest
is a PID, it must be the PID of a local process, dead or alive.If dest
is an atom, it must be the name of a registered processwhich is looked up at the time of delivery. No error is produced if the name doesnot refer to a process.The message is not sent immediately. Therefore,
dest
can receive other messagesin-between even when time
is 0
.This function returns a timer reference, which can be read with
read_timer/1
or canceled with cancel_timer/1
.The timer will be automatically canceled if the given
dest
is a PIDwhich is not alive or when the given PID exits. Note that timers will not beautomatically canceled when dest
is an atom (as the atom resolution is doneon delivery).Inlined by the compiler.
Options
:abs
- (boolean) whenfalse
,time
is treated as relative to thecurrent monotonic time. Whentrue
,time
is the absolute value of theErlang monotonic time at whichmsg
should be delivered todest
.To read more about Erlang monotonic time and other time-related concepts,look at the documentation for theSystem
module. Defaults tofalse
.
Examples
Specs
Sleeps the current process for the given
timeout
.timeout
is either the number of milliseconds to sleep as aninteger or the atom :infinity
. When :infinity
is given,the current process will sleep forever, and notconsume or reply to messages.Use this function with extreme care. For almost all situationswhere you would use
sleep/1
in Elixir, there is likely amore correct, faster and precise way of achieving the same withmessage passing.For example, if you are waiting for a process to perform someaction, it is better to communicate the progress of such actionwith messages.
Processes Monitor 1 1 X 4
In other words, do not:
Scrutiny 8 1 20 download free. But do:
Processes Monitor 1 1 0
For cases like the one above,
Task.async/1
and Task.await/2
arepreferred.Similarly, if you are waiting for a process to terminate,monitor that process instead of sleeping. Do not:
Instead do:
Specs
Spawns the given function according to the given options.
The result depends on the given options. In particular,if
:monitor
is given as an option, it will return a tuplecontaining the PID and the monitoring reference, otherwisejust the spawned process PID.More options are available; for the comprehensive list of available optionscheck
:erlang.spawn_opt/4
.Inlined by the compiler.
Examples
Specs
Spawns the given function
fun
from module mod
, passing the given args
according to the given options.The result depends on the given options. In particular,if
:monitor
is given as an option, it will return a tuplecontaining the PID and the monitoring reference, otherwisejust the spawned process PID.It also accepts extra options, for the list of available optionscheck
:erlang.spawn_opt/4
.Inlined by the compiler.
Specs
Removes the link between the calling process and the given item (process orport).
If there is no such link, this function does nothing. If
pid_or_port
doesnot exist, this function does not produce any errors and simply does nothing.The return value of this function is always
true
.See
:erlang.unlink/1
for more information.Inlined by the compiler.
Specs
Removes the registered
name
, associated with a PIDor a port identifier.Fails with
ArgumentError
if the name is not registeredto any PID or port.Inlined by the compiler.
Examples
Specs
Returns the PID or port identifier registered under
name
or nil
if thename is not registered. Spot maps 1 3 – map your network.See
:erlang.whereis/1
for more information.Processes Monitor 1 1 =
Examples
Processes Monitor 1 1 Inch
- Products
- All-In-One Products
- Wise Care 365
- Data & Security Products
- Wise Anti Malware
- Wise Data Recovery
- Wise Folder Hider Free
- Wise Folder Hider Pro
- Performance Products
- Wise Registry Cleaner
- Wise Disk Cleaner
- Wise Program Uninstaller
- Wise Memory Optimizer
- Wise Game Booster
- Wise System Monitor
- Wise PC 1stAid
- Wise Plugin Manager
- Utility Tools
- Wise Windows Key Finder
- Wise Duplicate Finder
- Wise Hotkey
- Wise Reminder
- Wise JetSearch
- Wise Auto Shutdown
- Wise Force Deleter
- Multimedia Tools
- Wise YouTube Downloader
- Wise Video Converter
- Wise Video Player
- Support
- Support Center
- FAQs
- Lost License
- Renew License
- Transfer License
- Feedback
- Product Manuals
- Forgot WFH Login Pasword
- Language
- Languages
- WiseCleaner Forum
- News & Offers
- WiseCleaner Advices & Suggestions
- Wise Care 365
- Wise Registry Cleaner
- Wise Disk Cleaner
- Other WiseCleaner Products
- Articles
- How-to
- Restore Files with Deep Scan
- Fix Windows 10 Slow Boot-up Issue
- Remove Windows 10 Built-in Apps
- Find and Remove Duplicate Photos
- Protecting Sensitive Files
- Assign Keyboard Shortcut to Launch App
- Set a Reminder in Windows 10
- >> More How-To Articles
- Windows Tips
- Disable Preloading Microsoft Edge at Startup
- High Memory Usage Issue about EoAExperiences.exe
- Launch Emoji Keyboard in Windows 10
- Start Windows 10 in Safe Mode
- God Mode of Windows 10
- Add Windows Photo Viewer in Windows 10
- Prevent PUA with Windows Defender
- >> More Windows Tips