| #
7be913e0
|
| 04-Aug-2025 |
John Baldwin <jhb@FreeBSD.org> |
libutil++: Add freebsd::pidfile wrapper class around struct pidfh
This class wraps the pidfile_* API from libutil. The destructor calls pidfile_remove() when an object is destroyed. This class is
libutil++: Add freebsd::pidfile wrapper class around struct pidfh
This class wraps the pidfile_* API from libutil. The destructor calls pidfile_remove() when an object is destroyed. This class is similar to std::unique_ptr<> in that it retains exclusive ownership of the pidfh object.
In addition to release and reset methods, write, close, and fileno methods are provided as wrappers for pidfile_*.
Sponsored by: Chelsio Communications Pull Request: https://github.com/freebsd/freebsd-src/pull/1794
show more ...
|
| #
b3127a2d
|
| 04-Aug-2025 |
John Baldwin <jhb@FreeBSD.org> |
libutil++: New library containing C++ utility classes for use in base
- freebsd::FILE_up is a wrapper class for std::unique_ptr<> for FILE objects which uses a custom deleter that calls fclose().
libutil++: New library containing C++ utility classes for use in base
- freebsd::FILE_up is a wrapper class for std::unique_ptr<> for FILE objects which uses a custom deleter that calls fclose().
- freebsd::malloc_up<T> is a wrapper class for std::unique_ptr<> which uses a custom deleter that calls free(). It is useful for pointers allocated by malloc() such as strdup().
- The freebsd::stringf() functions return a std::string constructed using a printf format string.
The current implementation of freebsd::stringf() uses fwopen() where the write function appends to a std::string.
Sponsored by: Chelsio Communications Pull Request: https://github.com/freebsd/freebsd-src/pull/1794
show more ...
|
| #
7be913e0
|
| 04-Aug-2025 |
John Baldwin <jhb@FreeBSD.org> |
libutil++: Add freebsd::pidfile wrapper class around struct pidfh
This class wraps the pidfile_* API from libutil. The destructor calls pidfile_remove() when an object is destroyed. This class is
libutil++: Add freebsd::pidfile wrapper class around struct pidfh
This class wraps the pidfile_* API from libutil. The destructor calls pidfile_remove() when an object is destroyed. This class is similar to std::unique_ptr<> in that it retains exclusive ownership of the pidfh object.
In addition to release and reset methods, write, close, and fileno methods are provided as wrappers for pidfile_*.
Sponsored by: Chelsio Communications Pull Request: https://github.com/freebsd/freebsd-src/pull/1794
show more ...
|
| #
b3127a2d
|
| 04-Aug-2025 |
John Baldwin <jhb@FreeBSD.org> |
libutil++: New library containing C++ utility classes for use in base
- freebsd::FILE_up is a wrapper class for std::unique_ptr<> for FILE objects which uses a custom deleter that calls fclose().
libutil++: New library containing C++ utility classes for use in base
- freebsd::FILE_up is a wrapper class for std::unique_ptr<> for FILE objects which uses a custom deleter that calls fclose().
- freebsd::malloc_up<T> is a wrapper class for std::unique_ptr<> which uses a custom deleter that calls free(). It is useful for pointers allocated by malloc() such as strdup().
- The freebsd::stringf() functions return a std::string constructed using a printf format string.
The current implementation of freebsd::stringf() uses fwopen() where the write function appends to a std::string.
Sponsored by: Chelsio Communications Pull Request: https://github.com/freebsd/freebsd-src/pull/1794
show more ...
|
| #
7be913e0
|
| 04-Aug-2025 |
John Baldwin <jhb@FreeBSD.org> |
libutil++: Add freebsd::pidfile wrapper class around struct pidfh
This class wraps the pidfile_* API from libutil. The destructor calls pidfile_remove() when an object is destroyed. This class is
libutil++: Add freebsd::pidfile wrapper class around struct pidfh
This class wraps the pidfile_* API from libutil. The destructor calls pidfile_remove() when an object is destroyed. This class is similar to std::unique_ptr<> in that it retains exclusive ownership of the pidfh object.
In addition to release and reset methods, write, close, and fileno methods are provided as wrappers for pidfile_*.
Sponsored by: Chelsio Communications Pull Request: https://github.com/freebsd/freebsd-src/pull/1794
show more ...
|
| #
b3127a2d
|
| 04-Aug-2025 |
John Baldwin <jhb@FreeBSD.org> |
libutil++: New library containing C++ utility classes for use in base
- freebsd::FILE_up is a wrapper class for std::unique_ptr<> for FILE objects which uses a custom deleter that calls fclose().
libutil++: New library containing C++ utility classes for use in base
- freebsd::FILE_up is a wrapper class for std::unique_ptr<> for FILE objects which uses a custom deleter that calls fclose().
- freebsd::malloc_up<T> is a wrapper class for std::unique_ptr<> which uses a custom deleter that calls free(). It is useful for pointers allocated by malloc() such as strdup().
- The freebsd::stringf() functions return a std::string constructed using a printf format string.
The current implementation of freebsd::stringf() uses fwopen() where the write function appends to a std::string.
Sponsored by: Chelsio Communications Pull Request: https://github.com/freebsd/freebsd-src/pull/1794
show more ...
|