aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src/c.erl
AgeCommit message (Collapse)Author
2018-06-18Update copyright yearHenrik Nord
2018-03-16mikpe/process_info-1-no-messages/PR-1745/OTP-14986Lukas Larsson
make erlang:process_info/1 not retrieve messages
2018-03-10make erlang:process_info/1 not retrieve messagesMikael Pettersson
process_info/1 retrieves a number of properties related to a process, including the list of messages in its mailbox. This is potentially unsafe if the target process has a large number of queued messages: - there is no a priori upper bound on the amount of memory being allocated to hold that list, and - the loop to retrieve the messages is uninterruptible, so the Erlang scheduler where this executes blocks for the duration We've seen process_info/1 bring down heavily loaded nodes on more than one occasion. At least once it appeared to have blocked the Erlang heart process from executing, causing the external heart to kill the VM. Consequently this removes 'messages' from the list of process_info tags to retrieve for process_info/1. Note that process_info/1 still retrieves 'message_queue_len', and process_info/2 can still retrieve 'messages' when asked to. A few places in the OTP libraries need minor adjustments, since they want 'message_queue_len' but compute it from the length of the list of messages.
2018-02-06stdlib: Do not call erlang:get_stacktrace()Hans Bolinder
2017-09-27Do not load .erlang from current dirDan Gudmundsson
It may be confusing that "hidden" .erlang is loaded from the current working directory. Use c:erlangrc([Dir1,..]) to search and load .erlang from other places than "$HOME/.erlang". Implies that c:erlangrc() needs to be documented.
2017-06-29Use current dir as default outdir for c:c/1,2Siri Hansen
In OTP-20, c:c/1,2 started using the directory of the source file as default output directory. For backwards compatibility reasons this is now reversed so the current directory is used instead.
2017-06-09stdlib: Handle Unicode atoms in c.erlHans Bolinder
Pull request 1459 (https://github.com/erlang/otp/pull/1459) points out one situation where Unicode atoms are not handled well in c.erl. This commit tries to fix all situations.
2017-03-08stdlib: Fix handling of locations and annotationsHans Bolinder
2017-02-22c: Reintroduce support for non-list options in c/2Björn Gustavsson
Before 0eb45e21d40 it was possible to write (for example): c(m, dcore) instead of the more verbose: c(m, [dcore]) Reintroduce this convenient shortcut.
2017-02-22c: Remove unused import of lists:concat/1Björn Gustavsson
2017-02-06Add shell shortcut for recompiling existing modulesRichard Carlsson
This extends the shell function c/1 and c/2 so that if the argument is a module name instead of a file name, it automatically locates the .beam file and the corresponding source file, and then recompiles the module using the same compiler options (plus any options passed to c/2). If compilation fails, the old beam file is preserved. Also adds c(Mod, Opts, Filter), where the Filter argument allows you to remove old compiler options before the new options are added.
2016-11-25Add shell mm() and lm() functionsRichard Carlsson
2016-03-15update copyright-yearHenrik Nord
2015-06-18Change license text to APLv2Bruce Yinhe
2015-05-12Add uptime() shell commandRichard Carlsson
2015-02-17make c:m/1 show module MD5Richard Carlsson
2014-01-22Merge branch 'dgud/test_unicode/OTP-10877'Dan Gudmundsson
* dgud/test_unicode/OTP-10877: sasl test: Quote executable paths (can contain spaces) rt_tools: Handle unicode chars in printouts kernel: code_SUITE fix unicode option Fix (unicode) debug info in test cases stdlib: Fix format if module resides in a unicode directory Fix testing with unicode paths test_server: Fix ts write unicode in config files
2014-01-21stdlib: Fix format if module resides in a unicode directoryDan Gudmundsson
2014-01-10Handle binary input in console helpersJosé Valim
The standard_input may be set to binary mode via io:getopts/2 and in case such cases the "i/0" console helper got stuck as it was unable to match new lines in binaries.
2013-05-29Merge branch 'maint'Fredrik Gustafsson
2013-05-22Teach c:ls/1 to show non-directory filesBjörn Gustavsson
In an email to erlang-questions, Bengt Kleberg wrote: When I use c:ls/1 it reminds me so much of Unix "ls" that I expect c:ls("filename") to work. The resulting error surprises me every time (not the same day). While teaching c:ls/1 to show non-directory files, update the error handling to make use of the POSIX error codes from file:list_dir/1 and file:format_error/1 (which had not been invented when the c module was first implemented). Suggested-by: Bengt Kleberg Test-suite-by: Bengt Kleberg
2013-05-06Fix unmatched_returns warnings in STDLIB and KernelHans Bolinder
2013-02-19Use ~ts for filenamesHans Bolinder
2013-02-12c: Remove handling of binaries in return from file:list_dir/1Björn Gustavsson
file:list_dir/1 will no longer return binaries.
2013-01-25Update copyright yearsBjörn-Egil Dahlberg
2013-01-25Make adjustments for UnicodeHans Bolinder
2013-01-09c: Remove support for packagesBjörn Gustavsson
2011-08-16emulator: Add a fourth element in exception stacktracesBjörn Gustavsson
This commit is a preparation for introducing location information (filename/line number) in stacktraces in exceptions. Currently a stack trace looks like: [{Mod1,Function1,Arity1}, . . . {ModN,FunctionN,ArityN}] Add a forth element to each tuple that can be used indication the filename and line number of the source file: [{Mod1,Function1,Arity1,Location1}, . . . {ModN,FunctionN,ArityN,LocationN}] In this commit, the fourth element will just be an empty list, and we will change all code that look at or manipulate stacktraces.
2011-05-12Types and specifications have been modified and addedHans Bolinder
2011-01-17c: Reduce memory footprintBjörn Gustavsson
Use a binary instead of a string for the help text.
2010-11-30Correct shell utilities to handle unicode and possibly binariesPatrik Nyblom
2010-11-30Handle binary file names and conversion of unicode stringsPatrik Nyblom
2010-09-10Remove warnings for clashes with new autoimported BIFsPatrik Nyblom
2010-04-14Merge branch 'ks/stdlib' into devErlang/OTP
* ks/stdlib: erl_parse.yrl: Add missing operator in type declaration stdlib: Add types and specs stdlib: Use fun object instead of {M,F} tuple ets: Cleanup as suggested by tidier OTP-8576 ks/stdlib
2010-04-13stdlib: Add types and specsKostis Sagonas
2009-12-14Fix c:nc to use outdir or cwd to find compiled object fileAlex Suraci
Before this patch, c:nc would naively assume the object file was created in the same location as the .erl file. This is often false, for example when an outdir is specified (often the case in make:all([netload])) or calling with c:nc("foo/bar") (because compile:file places bar.beam in the cwd, not foo/). [ Squashed in minor style changes. /bg ]
2009-11-20The R13B03 release.OTP_R13B03Erlang/OTP