summaryrefslogtreecommitdiffstats
path: root/src/daemon/main.c
Commit message (Collapse)AuthorAgeFilesLines
* win32: Make some unused-variable warnings go awayMaarten Bosmans2011-06-241-0/+2
|
* Remove unnecessary #includesMaarten Bosmans2011-06-221-6/+0
|
* daemon: Fix regression introduced in f1d1447e.Colin Guthrie2011-03-251-3/+43
| | | | | | | | | | | | | | | | | | | With Tanu's patch, the server no longer starts when a server is configured. While this is sensible in most circumstances there is a corner case where we still want to start. In a typical X11 login, module-x11-publish will be loaded and will thus set the PULSE_SERVER X11 property on the root window. This then hits the check introduced in f1d1447e and exits. If PA had previously crashed (thus leaving behind it's X11 properties) then this means that we will not autospawn nor even allow ourselves to be started manually until pax11publish -r is run to clear out the X11 properties. This is obviously not desirable. This patch introduces a more in-depth check of the server. If it looks like a local unix domain socket, then we do not exit straight away and instead probe further. This should not pose any problems with e.g. remote SSH usage as the DBus Machine ID is used in the server string.
* daemon: Fix some more error paths in the double forking.Colin Guthrie2011-03-251-1/+8
| | | | | | | | | | | | | | | | | | | As spotted by Tanu Kaskinen: The first process: daemon_pipe is not closed if the first fork() call fails. Even if it doesn't fail, the first process never closes daemon_pipe[0]. The second process: daemon_pipe[1] is not closed if anything fails between the first and the second fork() call. Also, if the second fork fails, then the finish section writes to daemon_pipe2[1], even though only the third process should do that. Also, if anything fails between the first and the second fork, then the second process never writes anything to daemon_pipe[1]. I don't know what happens in the first process in this case - does it get an error or does pa_loop_read() get stuck. The third process: No problems :)
* daemon: Fix regression with --start introduced with the double fork in 8e94f653Colin Guthrie2011-03-241-9/+42
| | | | | | | | The previous commit intoduced a double fork which caused a more or less immediate successful return prior to the hard work of actually starting a daemon. This patch simply used pipe() to only signal our father when the daemon really has finished starting.
* daemon: Fix missing include - cpu-orc.hArun Raghavan2011-03-201-0/+1
|
* volume: Add Orc-based optimised volume scalingArun Raghavan2011-03-051-0/+1
| | | | | | | | | This adds volume scaling for 1- and 2-channel software volume scaling using Orc. While testing the MMX and SSE backends on a Core2, I see an ~2x performance benefit over the hand-rolled MMX and SSE code. Since I haven't been able to test on other architectures, the Orc code is only used when MMX/SSE* is present. This can be changed in the future after testing on AMD and ARM machines.
* Implement some functions for win32Maarten Bosmans2011-02-171-1/+1
| | | | And disable building binaries for win32 that make no sense there
* Apply #ifdefs around functionality not available on win32Maarten Bosmans2011-02-171-0/+2
| | | | And also the reverse: around some win32 specific functionality
* Adapt win32 specific code to current APIMaarten Bosmans2011-02-171-2/+2
|
* Use <pulsecore/socket.h> instead of <sys/socket.h>Maarten Bosmans2011-02-171-1/+1
| | | | | | | | The check whether POSIX socket.h or WIN32 winsock2.h must be included can be made centrally. The downside is that some functionality of e.g. arpa/inet.h is also implemented in winsock.h, so that some files that don't use socket functions, but do use inet.h functions, must also include pulsecore/socket.h. (as well as arpa/inet.h)
* Clean up <poll.h> includesMaarten Bosmans2011-02-171-4/+0
| | | | | | Instead <pulsecore/poll.h> should be included. That file includes poll.h on platform where it is appropriate. Also remove some unnecessary <ioctl.h> includes.
* Fix typosZhang Wanming2010-12-201-1/+1
|
* daemon-conf: Add sync volume parameters to daemon-confJyri Sarha2010-10-161-0/+3
| | | | | | Signed-off-by: Jyri Sarha <jyri.sarha@nokia.com> Reviewed-by: Tanu Kaskinen <tanu.kaskinen@digia.com> Reviewd-by: Colin Guthrie <cguthrie@mandriva.org>
* cpu: Add CPU information to pa_coreArun Raghavan2010-09-231-5/+8
| | | | | | This retains CPU information (processor type and supported features) in pa_core, so that this information can be used by modules at init time to figure out what optimisations may be used.
* daemon: first take name on the bus, then return in starter processLennart Poettering2010-02-211-9/+9
| | | | http://pulseaudio.org/ticket/748
* daemon: Don't autospawn if a server address is explicitly configured.Tanu Kaskinen2010-01-091-0/+30
|
* daemon: complain if user passes too many argumentsLennart Poettering2009-11-201-0/+37
|
* daemon: during startup say whether we run in a VMLennart Poettering2009-11-051-1/+2
|
* daemon: make sure pa has its own session and process group, but is not its ↵Lennart Poettering2009-10-311-20/+20
| | | | leader so that we cannot acquire a tty ever
* daemon: realpath segfault fixDavid Yoder2009-10-311-1/+1
| | | | | | | | | | | | | | Lennart, Apparently I was debugging this at the same time as you. I can't figure out why my Fedora 11 install with glibc-2.10 has a glibc realpath that doesn't match the gnu documentation and returns null. But it does. Your commit aa8ce5bb9b159abb2ffb0f43996340566fc2e9c6 almost fixed my problem, but it needs a tweak. Thanks, David Yoder
* daemon: don't crash if pa_realpath() failsLennart Poettering2009-10-301-10/+13
|
* Merge branch 'master' into dbus-workTanu Kaskinen2009-10-021-9/+24
|\ | | | | | | | | Conflicts: src/daemon/daemon-conf.c
| * Don't refuse to start on systems using GNU stow, graft, STORE et alNix2009-09-291-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are multiple package management systems out there which implement packages using symlinks. The recent (otherwise useful) check to ensure that a re-executed pulseaudio is actually reexecuting itself unfortunately breaks in the presence of all these packaging systems, because PA_BINARY refers to its installed location (e.g. /usr/local/bin/pulseaudio), which is a symlink to the binary (e.g. /usr/local/stow/pulseaudio-0.9.18/bin/pulseaudio), because /proc/self/exe always contains the canonical path of the executable, with all symlinks resolved. (At least one distribution uses a symlink-based packaging system, so will be forced to apply this locally in any case.) The fix is simple: canonicalize PA_BINARY before equality-testing. (This should be completely safe, because the OS does just that when PA_BINARY is executed.) The patch is against 0.9.18, but applies without fuzz to current master.
| * daemon: make use of SIMD optional via config variable to ease debuggingLennart Poettering2009-09-031-2/+4
| |
| * daemon: clean up environment when forking off childrenLennart Poettering2009-09-021-2/+5
| |
| * daemon: don't override path env vars if they are already setLennart Poettering2009-09-011-3/+8
| |
* | Merge branch 'master' of git://0pointer.de/pulseaudio into dbus-workTanu Kaskinen2009-08-241-4/+7
|\| | | | | | | | | Conflicts: src/Makefile.am
| * Merge commit 'wtay/optimize'Lennart Poettering2009-08-231-4/+5
| |\
| | * svolume: add ARM optimized volume scalingWim Taymans2009-08-201-0/+2
| | |
| | * Get rid of liboilWim Taymans2009-08-201-4/+0
| | | | | | | | | | | | | | | | | | | | | Get rid of the liboil dependency and reimplement the liboil functions with an equivalent C implementation. Note that most of these functions are deprecated in liboil and that none of them had any optimisations. We can further specialize our handrolled versions for some extra speedups.
| | * main: hook up cpu detection codeWim Taymans2009-08-201-2/+2
| | | | | | | | | | | | | | | | | | Add CPU detection code to activate the various optimisations. Move some method definitions around. Use compatibility macros when we can.
| | * volume_sse: add sse optimisationsWim Taymans2009-08-201-0/+1
| | |
| | * volume: add first mmx optimized functionWim Taymans2009-08-201-0/+2
| | | | | | | | | | | | | | | Add code for an mmx optimized version of s16ne volume scaling. Install the custom function.
| * | adjust various data/library paths automatically if we are run from a build treeLennart Poettering2009-08-211-0/+2
| |/
* | Merge branch 'master' of git://0pointer.de/pulseaudio into dbus-workTanu Kaskinen2009-08-161-5/+16
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/Makefile.am src/daemon/daemon-conf.c src/daemon/daemon.conf.in src/modules/module-stream-restore.c src/pulse/client-conf.c src/pulsecore/namereg.c
| * daemon: reset scheduling priority on startup, tooLennart Poettering2009-08-121-0/+1
| |
| * core-util: move personality resetting into core-utilLennart Poettering2009-08-121-9/+1
| |
| * Split OSS support in output and wrapper.Diego Elio 'Flameeyes' Pettenò2009-08-081-1/+1
| | | | | | | | | | | | | | Since Fedora does not enable OSS output support at all, but still uses padsp, and in Gentoo we could also make use of padsp without OSS output support, split the two things in two parameters, although they both check for sys/soundcard.h once.
| * Merge branch 'master' of ssh://rootserver/home/lennart/git/public/pulseaudioLennart Poettering2009-07-231-0/+10
| |\ | | | | | | | | | | | | Conflicts: src/daemon/main.c
| | * Merge branch 'master' of ssh://rootserver/home/lennart/git/public/pulseaudioLennart Poettering2009-07-221-22/+0
| | |\
| | | * Remove exploitable LD_BIND_NOW hack (CVE-2009-1894).Diego Elio 'Flameeyes' Pettenò2009-07-161-22/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of trying to re-execute pulseaudio itself with LD_BIND_NOW set, just find the correct flag for the linker to request immediate bindings (all ELF files support that option), and use that when linking the daemon. Reduce the amount of compiled and executed code as well.
| | * | daemon: reset personality, to make the autospawn env cleaup completeLennart Poettering2009-07-221-0/+10
| | |/
| * / daemon: before exec'ing ourselves, make sure nobody plays games with ↵Lennart Poettering2009-07-201-4/+12
| |/ | | | | | | /proc/self/exe
* | dbus: Implement the Name property of the core object.Tanu Kaskinen2009-07-031-1/+1
| |
* | server-lookup: Update the D-Bus identifiers to be versioned.Tanu Kaskinen2009-06-301-1/+1
| |
* | Merge branch 'master' into dbus-workTanu Kaskinen2009-06-291-0/+1
|\|
| * Add a missing sys/stat.h include for FreeBSD to declare umask().Diego Elio 'Flameeyes' Pettenò2009-06-291-0/+1
| |
* | Merge branch 'master' into dbus-workTanu Kaskinen2009-06-291-205/+39
|\| | | | | | | | | | | | | | | Conflicts: src/daemon/daemon-conf.c src/daemon/daemon-conf.h src/daemon/main.c src/pulsecore/dbus-util.h
| * rtclock: fix build after mergeLennart Poettering2009-06-221-1/+0
| |