aboutsummaryrefslogtreecommitdiffstats
path: root/example/poll.c
AgeCommit message (Collapse)AuthorLines
2025-06-27license: s/COPYING/GPL2.txt, s/COPYING.LIB/LGPL2.txtizxl007-1/+1
Signed-off-by: izxl007 <zeng.zheng@zte.com.cn>
2024-03-20Add FUSE_FILL_DIR_DEFAULTS enum (#903)FredyVia-1/+1
In order to use the fuse_fill_dir_t function in a C++ program, add the enum item: FUSE_FILL_DIR_DEFAULTS Without this change g++ compilation failed with example/hello.c:94:35: error: invalid conversion from ‘int’ to ‘fuse_fill_dir_flags’ [-fpermissive] 94 | filler(buf, ".", NULL, 0, 0); | ^ | | | int
2024-03-20Fix use-after-free in example/poll.cBernd Schubert-6/+16
As noticed by valgrind in issue #907 example/poll.c triggers a use-after-free ==85200== Thread 2: ==85200== Invalid read of size 4 ==85200== at 0x485E54A: send_notify_iov (fuse_lowlevel.c:2267) ==85200== by 0x485E54A: fuse_lowlevel_notify_poll (fuse_lowlevel.c:2289) ==85200== by 0x1096F2: fsel_producer (poll.c:245) ==85200== by 0x4897EA6: start_thread (pthread_create.c:477) ==85200== by 0x49ADA6E: clone (clone.S:95) ==85200== Address 0x5291d68 is 392 bytes inside a block of size 920 free'd ==85200== at 0x48399AB: free (vg_replace_malloc.c:538) ==85200== by 0x485A12C: fuse_destroy (fuse.c:5103) ==85200== by 0x486220F: fuse_main_real (helper.c:389) ==85200== by 0x1091D6: main (poll.c:288) ==85200== Block was alloc'd at ==85200== at 0x483AB65: calloc (vg_replace_malloc.c:760) ==85200== by 0x485BAA0: fuse_session_new (fuse_lowlevel.c:3036) ==85200== by 0x4859AF2: fuse_new@@FUSE_3.1 (fuse.c:4966) ==85200== by 0x4862129: fuse_main_real (helper.c:345) ==85200== by 0x1091D6: main (poll.c:288) Issue is that the "fsel_producer" thread is still active after fuse_destroy - it gets destructed too late.
2023-03-29Fix typos and configure spellcheck for PRsYaroslav Halchenko-1/+1
2023-01-28Install a the configure_file (config.h) and use in headersBernd Schubert-2/+0
This addresses: https://github.com/libfuse/libfuse/issues/724 HAVE_LIBC_VERSIONED_SYMBOLS configures the library if to use versioned symbols and is set at meson configuration time. External filesystems (the main target, actually) include fuse headers and the preprocessor then acts on HAVE_LIBC_VERSIONED_SYMBOLS. Problem was now that 'config.h' was not distributed with libfuse and so HAVE_LIBC_VERSIONED_SYMBOLS was never defined with external tools and the preprocessor did the wrong decision. This commit also increases the the minimal meson version, as this depends on meson feature only available in 0.50 <quote 'meson' > WARNING: Project specifies a minimum meson_ version '>= 0.42' but uses features which were added in newer versions: * 0.50.0: {'install arg in configure_file'} </quote> Additionally the config file has been renamed to "fuse_config.h" to avoid clashes - 'config.h' is not very specific.
2020-03-13State GPL version in comment (#485)Dr. David Alan Gilbert-1/+1
IN a bunch of comments we say 'under the terms of the GNU GPL', make it clear this is GPLv2 (as LICENSE says). Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
2020-01-30examples: mark ops variables constant (#496)zsugabubus-1/+1
2019-03-08Document fuse_fsync_in.fsync_flags and remove magic numbers (#375)Alan Somers-1/+1
2017-07-08Added public fuse_lib_help(), bumped minor versionNikolaus Rath-1/+1
2016-10-28Clean-up doxygen documentationNikolaus Rath-4/+3
Fixes: #81.
2016-10-15Pass fuse_file_info to getattr, chown, chmod, truncate, utimens handlersNikolaus Rath-1/+3
This obsoletes the ftruncate & fgetattr handlers. Fixes #58.
2016-10-09Renamed ioctl and poll examplesNikolaus Rath-0/+295
The new names should make it more obvious at first glance what each example demonstrates.