Consider the following issues when writing your application:
No function exists to explicitly create a new project.
A user cannot log in if no default project for the user exists in the project database.
A new task in the user's default project is created when the user logs in.
When a process joins a project, the project's resource control and pool settings are applied to the process.
setproject() requires privilege. The newtask command does not require privilege if you own the process. Either method can be used to create a task, but only newtask can change the project of a running process.
No parent/child relationship exists between tasks.
Finalized tasks can be created by using newtask -F or by using setproject() to associate the caller with a new project. Finalized tasks are useful when trying to accurately estimate aggregate resource accounting.