summaryrefslogtreecommitdiffstats
path: root/drivers/unix
Commit message (Collapse)AuthorAgeFilesLines
* Added a spinlock template as well as a thread work pool class.Juan Linietsky2020-02-112-3/+3
| | | | Also, optimized shader compilation to happen on threads.
* Merge pull request #35301 from Calinou/improve-console-error-loggingRémi Verschelde2020-02-101-13/+13
|\ | | | | Improve the console error logging appearance
| * Improve the console error logging appearanceHugo Locurcio2020-01-191-13/+13
| | | | | | | | | | | | | | This makes secondary information less visually prominent to improve overall readability. Various loggers were also tweaked for consistency.
* | Make `OS.execute()` blocking by default if not specifiedHugo Locurcio2020-01-231-1/+1
|/ | | | | This makes `OS.execute()` calls quicker to set up when calling programs in a blocking fashion.
* Disable colored console output when standard output isn't a TTYHugo Locurcio2020-01-041-8/+24
| | | | | This prevents Godot from writing ANSI escape codes when redirecting stdout and stderr to a file.
* Update copyright statements to 2020Rémi Verschelde2020-01-0120-40/+40
| | | | | | | | | | | Happy new year to the wonderful Godot community! We're starting a new decade with a well-established, non-profit, free and open source game engine, and tons of further improvements in the pipeline from hundreds of contributors. Godot will keep getting better, and we're looking forward to all the games that the community will keep developing and releasing with it.
* Make NetSockets quiter.Fabio Alessandrelli2019-12-172-15/+35
| | | | Use print_verbose instead of ERR_* for network errors.
* UDP sockets broadcast is now disabled by default.Fabio Alessandrelli2019-12-141-4/+6
| | | | | Add method `set_broadcast_enabled` to allow enabling broadcast via GDScript.
* NetSocket set_broadcast_enabled returns Error enumFabio Alessandrelli2019-12-102-4/+6
|
* Fix some crashes, overflows and using variables without valuesRafał Mikrut2019-11-011-0/+1
|
* Merge pull request #32617 from Faless/fix/fopen_close_execRémi Verschelde2019-10-261-4/+23
|\ | | | | Disable file descriptor sharing with subprocs.
| * Disable file descriptor sharing with subprocs.Fabio Alessandrelli2019-10-071-4/+23
| | | | | | | | | | | | | | | | | | On Unix systems, file descriptors are usually shared among child processes. This means, that if we spawn a subprocess (or we fork) like we do in the editor any open file descriptor will leak to the new process. This PR sets the close-on-exec flag when opening a file, which causes the file descriptor to not be shared with the child process.
* | Use WSAConnect instead of connect on Windows.Fabio Alessandrelli2019-10-251-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The misterious windows networking stack... Using connect instead of WSAConnect causes socket error 10022 under certain conditions. See: https://github.com/godotengine/webrtc-native/ (issue 6) Having to guess, code path for connect is different then WSAConnect with NULL extra parameters. The only reference about weird error with this code mentions something called "Windows Filtering Platform" but windows internals are, as always, obscure. This might be something to try and report to Microsoft if anyone has the time to spare with the likely outcome of being ignored.
* | Fix compilation warnings in macOS build, enable `warnings=extra werror=yes` ↵bruvzg2019-10-243-2/+4
| | | | | | | | for macOS CI.
* | Merge pull request #32616 from Faless/net/fix_close_execRémi Verschelde2019-10-082-0/+19
|\ \ | | | | | | Disable socket descriptor sharing with subprocs.
| * | Disable socket descriptor sharing with subprocs.Fabio Alessandrelli2019-10-072-0/+19
| |/ | | | | | | | | | | | | | | | | On Unix systems, sockets are like file descriptors, and file descriptors are usually shared among child processes. This means, that if we spawn a subprocess (or we fork) like we do in the editor, open file descriptors will leak to the new process. This causes issue with sockets as they might remain open and bound (listening) when the original process closes.
* | Merge pull request #32454 from jeronimo-schreyer/disable_unix_socketRémi Verschelde2019-10-081-0/+2
|\ \ | |/ |/| Optional Unix Socket disable for devices that do not support it
| * Optional Unix Socket disable for devices that do not support itJairo2019-09-301-0/+2
| |
* | IP: Fix build error on UWPRémi Verschelde2019-10-021-1/+1
| | | | | | | | | | | | | | | | | | | | Fixes this error: ``` drivers\unix\ip_unix.cpp(155): error C2593: 'operator =' is ambiguous .\core/ustring.h(177): note: could be 'void String::operator =(const CharType *)' .\core/ustring.h(176): note: or 'void String::operator =(const char *)' drivers\unix\ip_unix.cpp(155): note: while trying to match the argument list '(String, int)' ```
* | Fix casting to uint64_t when returning unix system timeKanabenki2019-10-011-1/+1
| |
* | Added an exit code to the blocking mode of OS::executeRuslan Mullayanov2019-09-261-1/+1
| | | | | | | | | | | | Updated documentation accordingly. Fixes #31881.
* | Added some obvious errors explanationsqarmin2019-09-252-12/+13
|/
* Support for file not found in ConfigFile::Load and handle a few specific casesPouleyKetchoupp2019-08-211-2/+11
| | | | | | | EditorSettings::set_project_metadata: creates project_metadata.cfg if it doesn't exist EditorPlugin::get_config: removed (not used) Fixes #31444
* Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in 'core/' and 'editor/'Braden Bodily2019-08-173-21/+9
| | | | | | | | | Condensed some if and ERR statements. Added dots to end of error messages Couldn't figure out EXPLAINC. These files gave me trouble: core/error_macros.h, core/io/file_access_buffered_fa.h (where is it?), core/os/memory.cpp, drivers/png/png_driver_common.cpp, drivers/xaudio2/audio_driver_xaudio2.cpp (where is it?)
* Remove redundant author doc commentsIAmActuallyCthulhu2019-08-125-19/+1
|
* Optimize DirAccessUnix::get_next() for some file systemsHadrien2019-07-291-18/+13
| | | | | | | | | On some file systems, like ext4 on Linux, readdir() gives enough information to determine the entry type in order to avoid doing a stat() system call. Use this information and call stat() only if necessary: for file systems that do not support this feature and for links.
* Revert "Optimize DirAccessUnix::get_next() for some file systems"Geequlim2019-07-211-14/+10
|
* Optimize DirAccessUnix::get_next() for some file systemsHadrien2019-07-171-10/+14
| | | | | | | | On some file systems, like ext4 on Linux, readdir() gives enough information to determine the entry type in order to avoid doing a stat() system call. Use this information and call stat() only if necessary.
* Use reference to constant in functionsqarmin2019-07-102-2/+2
|
* Fixes minor issues found by static analyzerqarmin2019-07-071-1/+1
|
* Merge pull request #30126 from qarmin/remove_unnecessary_codeRémi Verschelde2019-07-011-4/+4
|\ | | | | Remove unnecessary code and add some error explanations
| * Remove unnecessary code and add some error explanationsqarmin2019-07-011-4/+4
| |
* | Merge pull request #29815 from NilsIrl/plus_file_1Rémi Verschelde2019-07-011-1/+1
|\ \ | | | | | | Replace ` + "/" + ` with `String::file_add()`
| * | Replace ` + "/" + ` with `String::file_add()`Nils ANDRÉ-CHANG2019-06-231-1/+1
| | |
* | | Fix ip_unix.cpp inclusion order for OpenBSD.Fabio Alessandrelli2019-06-281-1/+1
| | |
* | | Properly disable SIGPIPE on OSX network sockets.Fabio Alessandrelli2019-06-281-8/+9
| |/ |/| | | | | | | Disable SO_NOSIGPIPE socket option when avaiable. Use MSG_NOSIGNAL send flag on systems that support it.
* | Merge pull request #29941 from qarmin/redundant_code_and_othersRémi Verschelde2019-06-273-9/+3
|\ \ | | | | | | Remove redundant code, possible NULL pointers and others
| * | Some code changed with Clang-Tidyqarmin2019-06-263-9/+3
| | |
* | | Merge pull request #29935 from Faless/net/get_if_multicast_prRémi Verschelde2019-06-214-28/+123
|\ \ \ | |/ / |/| | Multicast, more network interfaces info
| * | Multicast support in NetSocket/PacketPeerUDPFabio Alessandrelli2019-06-212-0/+71
| | |
| * | Implement IP.get_local_interfaces.Fabio Alessandrelli2019-06-212-28/+52
| | | | | | | | | | | | | | | | | | | | | Allow getting interfaces names and assigned names. On UWP this is not supported, and the function will return one interface for each local address (with interface name the local address itself).
* | | Merge pull request #29283 from qarmin/fix_some_always_same_valuesRémi Verschelde2019-06-201-1/+1
|\ \ \ | |/ / |/| | Remove always true/false values
| * | Fix always true/false valuesqarmin2019-06-201-1/+1
| |/
* / Fix compilation warnings in JS and Windows buildsRémi Verschelde2019-06-151-3/+3
|/ | | | | | | | | | Warnings raised by Emscripten 1.38.0 and MinGW64 5.0.4 / GCC 8.3.0. JS can now build with `werror=yes warnings=extra`. MinGW64 still has a few warnings to resolve with `warnings=extra`, and only one with `warnings=all`. Part of #29033 and #29801.
* added a const keyword for a methods that return constant literal...hbina0852019-05-212-2/+2
|
* Ignore a warning in _get_socket_error (-Wlogical-op).marxin2019-05-021-0/+11
| | | | | | | | | | | | | | drivers/unix/net_socket_posix.cpp: In member function 'NetSocketPosix::NetError NetSocketPosix::_get_socket_error()': drivers/unix/net_socket_posix.cpp:197:22: warning: logical 'or' of equal expressions [-Wlogical-op] 197 | if (errno == EAGAIN || errno == EWOULDBLOCK) | ^ and: modules/mono/utils/string_utils.cpp: In function 'int {anonymous}::sfind(const String&, int)': modules/mono/utils/string_utils.cpp:68:48: error: logical 'or' of collectively exhaustive tests is always true [-Werror=logical-op] found = src[read_pos] == 's' || (c >= '0' || c <= '4'); ~~~~~~~~~^~~~~~~~~~~
* Add FileAccess::set_unix_permissions for Unix platformsJuan Linietsky2019-04-074-7/+38
|
* Remove SIGCHILD handle in OS_Unix, interferes with pclose()Juan Linietsky2019-04-071-17/+0
|
* Fix jump over uninitialized value in OS Unix/X11Fabio Alessandrelli2019-04-091-0/+1
|
* Revert accidental commitsPedro J. Estébanez2019-03-203-254/+0
| | | | | This reverts commit fb37284c027b494ed3ec21124001fcb729f42cc4. This reverts commit 4db0f51b9aa76cfc7649787fe1970af606ce8dab.