summaryrefslogtreecommitdiff
path: root/drivers/unix
AgeCommit message (Collapse)Author
2020-01-04Disable colored console output when standard output isn't a TTYHugo Locurcio
This prevents Godot from writing ANSI escape codes when redirecting stdout and stderr to a file.
2020-01-01Update copyright statements to 2020Rémi Verschelde
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.
2019-12-17Make NetSockets quiter.Fabio Alessandrelli
Use print_verbose instead of ERR_* for network errors.
2019-12-14UDP sockets broadcast is now disabled by default.Fabio Alessandrelli
Add method `set_broadcast_enabled` to allow enabling broadcast via GDScript.
2019-12-10NetSocket set_broadcast_enabled returns Error enumFabio Alessandrelli
2019-11-01Fix some crashes, overflows and using variables without valuesRafał Mikrut
2019-10-26Merge pull request #32617 from Faless/fix/fopen_close_execRémi Verschelde
Disable file descriptor sharing with subprocs.
2019-10-25Use WSAConnect instead of connect on Windows.Fabio Alessandrelli
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.
2019-10-24Fix compilation warnings in macOS build, enable `warnings=extra werror=yes` ↵bruvzg
for macOS CI.
2019-10-08Merge pull request #32616 from Faless/net/fix_close_execRémi Verschelde
Disable socket descriptor sharing with subprocs.
2019-10-08Merge pull request #32454 from jeronimo-schreyer/disable_unix_socketRémi Verschelde
Optional Unix Socket disable for devices that do not support it
2019-10-07Disable file descriptor sharing with subprocs.Fabio Alessandrelli
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.
2019-10-07Disable socket descriptor sharing with subprocs.Fabio Alessandrelli
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.
2019-10-02IP: Fix build error on UWPRémi Verschelde
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)' ```
2019-10-01Fix casting to uint64_t when returning unix system timeKanabenki
2019-09-30Optional Unix Socket disable for devices that do not support itJairo
2019-09-26Added an exit code to the blocking mode of OS::executeRuslan Mullayanov
Updated documentation accordingly. Fixes #31881.
2019-09-25Added some obvious errors explanationsqarmin
2019-08-21Support for file not found in ConfigFile::Load and handle a few specific casesPouleyKetchoupp
EditorSettings::set_project_metadata: creates project_metadata.cfg if it doesn't exist EditorPlugin::get_config: removed (not used) Fixes #31444
2019-08-17Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in 'core/' and 'editor/'Braden Bodily
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?)
2019-08-12Remove redundant author doc commentsIAmActuallyCthulhu
2019-07-29Optimize DirAccessUnix::get_next() for some file systemsHadrien
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.
2019-07-21Revert "Optimize DirAccessUnix::get_next() for some file systems"Geequlim
2019-07-17Optimize DirAccessUnix::get_next() for some file systemsHadrien
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.
2019-07-10Use reference to constant in functionsqarmin
2019-07-07Fixes minor issues found by static analyzerqarmin
2019-07-01Merge pull request #30126 from qarmin/remove_unnecessary_codeRémi Verschelde
Remove unnecessary code and add some error explanations
2019-07-01Remove unnecessary code and add some error explanationsqarmin
2019-07-01Merge pull request #29815 from NilsIrl/plus_file_1Rémi Verschelde
Replace ` + "/" + ` with `String::file_add()`
2019-06-28Fix ip_unix.cpp inclusion order for OpenBSD.Fabio Alessandrelli
2019-06-28Properly disable SIGPIPE on OSX network sockets.Fabio Alessandrelli
Disable SO_NOSIGPIPE socket option when avaiable. Use MSG_NOSIGNAL send flag on systems that support it.
2019-06-27Merge pull request #29941 from qarmin/redundant_code_and_othersRémi Verschelde
Remove redundant code, possible NULL pointers and others
2019-06-26Some code changed with Clang-Tidyqarmin
2019-06-23Replace ` + "/" + ` with `String::file_add()`Nils ANDRÉ-CHANG
2019-06-21Merge pull request #29935 from Faless/net/get_if_multicast_prRémi Verschelde
Multicast, more network interfaces info
2019-06-21Multicast support in NetSocket/PacketPeerUDPFabio Alessandrelli
2019-06-21Implement IP.get_local_interfaces.Fabio Alessandrelli
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).
2019-06-20Merge pull request #29283 from qarmin/fix_some_always_same_valuesRémi Verschelde
Remove always true/false values
2019-06-20Fix always true/false valuesqarmin
2019-06-15Fix compilation warnings in JS and Windows buildsRémi Verschelde
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.
2019-05-21added a const keyword for a methods that return constant literal...hbina085
2019-05-02Ignore a warning in _get_socket_error (-Wlogical-op).marxin
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'); ~~~~~~~~~^~~~~~~~~~~
2019-04-07Add FileAccess::set_unix_permissions for Unix platformsJuan Linietsky
2019-04-07Remove SIGCHILD handle in OS_Unix, interferes with pclose()Juan Linietsky
2019-04-09Fix jump over uninitialized value in OS Unix/X11Fabio Alessandrelli
2019-03-20Revert accidental commitsPedro J. Estébanez
This reverts commit fb37284c027b494ed3ec21124001fcb729f42cc4. This reverts commit 4db0f51b9aa76cfc7649787fe1970af606ce8dab.
2019-03-20Create class for shared memory blocks [wip]Pedro J. Estébanez
2019-02-27Merge pull request #26159 from marxin/fix-Wsuggest-attribute=formatRémi Verschelde
Fix -Wsuggest-attribute=format warnings.
2019-02-27Fix -Wsign-compare warnings.marxin
I decided to modify code in a defensive way. Ideally functions like size() or length() should return an unsigned type.
2019-02-27Fix -Wsuggest-attribute=format warnings.marxin